Issue #3122547 by dww, jungle, Kristen Pol: Fix duplicate word typos (the the, to to, etc) for test assertions
parent
8c8056ec9e
commit
8964921c80
|
@ -35,7 +35,7 @@ class AggregatorPluginManagerTest extends KernelTestBase {
|
||||||
$widget_definition = \Drupal::service('plugin.manager.aggregator.parser')->getDefinition('aggregator_test_parser');
|
$widget_definition = \Drupal::service('plugin.manager.aggregator.parser')->getDefinition('aggregator_test_parser');
|
||||||
|
|
||||||
// Test if hook_aggregator_parser_info_alter is being called.
|
// 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 @@ class AggregatorPluginManagerTest extends KernelTestBase {
|
||||||
$widget_definition = \Drupal::service('plugin.manager.aggregator.processor')->getDefinition('aggregator_test_processor');
|
$widget_definition = \Drupal::service('plugin.manager.aggregator.processor')->getDefinition('aggregator_test_processor');
|
||||||
|
|
||||||
// Test if hook_aggregator_processor_info_alter is being called.
|
// 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') {
|
if (action === 'add') {
|
||||||
messageObjects[area].indexes[type].push(
|
messageObjects[area].indexes[type].push(
|
||||||
message.add(
|
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 },
|
{ type },
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
messageObjects.default.zone.add(
|
messageObjects.default.zone.add(
|
||||||
`This is message number ${i} of the type, ${
|
`This is message number ${i} of the type, ${
|
||||||
testMessages.types[i % testMessages.types.length]
|
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] },
|
{ type: testMessages.types[i % testMessages.types.length] },
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
var action = $target.attr('data-action');
|
var action = $target.attr('data-action');
|
||||||
|
|
||||||
if (action === 'add') {
|
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
|
type: type
|
||||||
}));
|
}));
|
||||||
} else if (action === 'remove') {
|
} else if (action === 'remove') {
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
});
|
});
|
||||||
$('[data-action="add-multiple"]').once('add-multiple').on('click', function () {
|
$('[data-action="add-multiple"]').once('add-multiple').on('click', function () {
|
||||||
[0, 1, 2, 3, 4, 5].forEach(function (i) {
|
[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]
|
type: testMessages.types[i % testMessages.types.length]
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
|
@ -50,8 +50,8 @@ class JsMessageTest extends WebDriverTestBase {
|
||||||
$selector = "$messagesSelector .messages.messages--$type";
|
$selector = "$messagesSelector .messages.messages--$type";
|
||||||
$msg_element = $web_assert->waitForElementVisible('css', $selector);
|
$msg_element = $web_assert->waitForElementVisible('css', $selector);
|
||||||
$this->assertNotEmpty($msg_element, "Message element visible: $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.");
|
$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 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);
|
$this->assertCurrentMessages($current_messages, $messagesSelector);
|
||||||
}
|
}
|
||||||
// Remove messages 1 by 1 and confirm the messages are expected.
|
// Remove messages 1 by 1 and confirm the messages are expected.
|
||||||
|
@ -69,7 +69,7 @@ class JsMessageTest extends WebDriverTestBase {
|
||||||
$types = JSMessageTestController::getTypes();
|
$types = JSMessageTestController::getTypes();
|
||||||
$nb_messages = count($types) * 2;
|
$nb_messages = count($types) * 2;
|
||||||
for ($i = 0; $i < $nb_messages; $i++) {
|
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.
|
// Test adding multiple messages at once.
|
||||||
// @see processMessages()
|
// @see processMessages()
|
||||||
|
|
Loading…
Reference in New Issue