Commit 8964921c authored by catch's avatar catch
Browse files

Issue #3122547 by dww, jungle, Kristen Pol: Fix duplicate word typos (the the,...

Issue #3122547 by dww, jungle, Kristen Pol: Fix duplicate word typos (the the, to to, etc)  for test assertions
parent 8c8056ec
......@@ -35,7 +35,7 @@ public function testParserInfoAlter() {
$widget_definition = \Drupal::service('plugin.manager.aggregator.parser')->getDefinition('aggregator_test_parser');
// Test if hook_aggregator_parser_info_alter is being called.
$this->assertTrue($widget_definition['definition_altered'], "The 'aggregator_test_parser' plugin definition was updated in in `hook_aggregator_parser_info_alter()`");
$this->assertTrue($widget_definition['definition_altered'], "The 'aggregator_test_parser' plugin definition was updated in `hook_aggregator_parser_info_alter()`");
}
/**
......@@ -45,7 +45,7 @@ public function testProcessorInfoAlter() {
$widget_definition = \Drupal::service('plugin.manager.aggregator.processor')->getDefinition('aggregator_test_processor');
// Test if hook_aggregator_processor_info_alter is being called.
$this->assertTrue($widget_definition['definition_altered'], "The 'aggregator_test_processor' plugin definition was updated in in `hook_aggregator_processor_info_alter()`");
$this->assertTrue($widget_definition['definition_altered'], "The 'aggregator_test_processor' plugin definition was updated in `hook_aggregator_processor_info_alter()`");
}
}
......@@ -51,7 +51,7 @@
if (action === 'add') {
messageObjects[area].indexes[type].push(
message.add(
`This is a message of the type, ${type}. You be the the judge of its importance.`,
`This is a message of the type, ${type}. You be the judge of its importance.`,
{ type },
),
);
......@@ -71,7 +71,7 @@
messageObjects.default.zone.add(
`This is message number ${i} of the type, ${
testMessages.types[i % testMessages.types.length]
}. You be the the judge of its importance.`,
}. You be the judge of its importance.`,
{ type: testMessages.types[i % testMessages.types.length] },
),
);
......
......@@ -36,7 +36,7 @@
var action = $target.attr('data-action');
if (action === 'add') {
messageObjects[area].indexes[type].push(message.add("This is a message of the type, ".concat(type, ". You be the the judge of its importance."), {
messageObjects[area].indexes[type].push(message.add("This is a message of the type, ".concat(type, ". You be the judge of its importance."), {
type: type
}));
} else if (action === 'remove') {
......@@ -45,7 +45,7 @@
});
$('[data-action="add-multiple"]').once('add-multiple').on('click', function () {
[0, 1, 2, 3, 4, 5].forEach(function (i) {
messageObjects.multiple.push(messageObjects.default.zone.add("This is message number ".concat(i, " of the type, ").concat(testMessages.types[i % testMessages.types.length], ". You be the the judge of its importance."), {
messageObjects.multiple.push(messageObjects.default.zone.add("This is message number ".concat(i, " of the type, ").concat(testMessages.types[i % testMessages.types.length], ". You be the judge of its importance."), {
type: testMessages.types[i % testMessages.types.length]
}));
});
......
......@@ -50,8 +50,8 @@ public function testAddRemoveMessages() {
$selector = "$messagesSelector .messages.messages--$type";
$msg_element = $web_assert->waitForElementVisible('css', $selector);
$this->assertNotEmpty($msg_element, "Message element visible: $selector");
$web_assert->elementContains('css', $selector, "This is a message of the type, $type. You be the the judge of its importance.");
$current_messages[$selector] = "This is a message of the type, $type. You be the the judge of its importance.";
$web_assert->elementContains('css', $selector, "This is a message of the type, $type. You be the judge of its importance.");
$current_messages[$selector] = "This is a message of the type, $type. You be the judge of its importance.";
$this->assertCurrentMessages($current_messages, $messagesSelector);
}
// Remove messages 1 by 1 and confirm the messages are expected.
......@@ -69,7 +69,7 @@ public function testAddRemoveMessages() {
$types = JSMessageTestController::getTypes();
$nb_messages = count($types) * 2;
for ($i = 0; $i < $nb_messages; $i++) {
$current_messages[] = "This is message number $i of the type, {$types[$i % count($types)]}. You be the the judge of its importance.";
$current_messages[] = "This is message number $i of the type, {$types[$i % count($types)]}. You be the judge of its importance.";
}
// Test adding multiple messages at once.
// @see processMessages()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment