Skip to content

Commit

Permalink
fix UI (text changes) tests for Drupal 10.1+
Browse files Browse the repository at this point in the history
  • Loading branch information
WengerK committed Feb 21, 2024
1 parent 37338b5 commit faf2ac3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/src/Functional/UiFieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,14 @@ public function testAddField() {
$this->assertSession()->statusCodeEquals(200);

// Add the Template Whisperer field.
$this->clickLink('Add field');
// Since Drupal 10.1.0 the button "add field" text has been changed.
if (version_compare(\Drupal::VERSION, '10.2.0', '<')) {
$this->clickLink('Create a new field');
}
else {
$this->clickLink('Add field');
}

$this->fillField('Add a new field', 'template_whisperer');
$this->fillField('Label', 'Template Whisperer');
$this->fillField('Machine-readable name', 'template_whisperer');
Expand Down

0 comments on commit faf2ac3

Please sign in to comment.