Skip to content

Commit

Permalink
Merge pull request #1139 from creative-commoners/pulls/5.1/fix-behat-…
Browse files Browse the repository at this point in the history
…tests

FIX Failed Behat test
  • Loading branch information
GuySartorelli authored Jan 30, 2024
2 parents af4ac9b + 95c31bd commit 7c6c107
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tests/Behat/features/multiple-wysiwyg-configs.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@ Feature: multiple elemental blocks with different HTMLEditorConfig instances
Given I see a list of blocks
# Check the link menu in the WYSIWYG "insert link" button is correct for block 1
When I click on block 1
And I click on the "#Form_ElementForm_1 [aria-label^='Insert link'] button" element
Then I should see "Page on this site" in the ".mce-menu.mce-in" element
And I should see "Link to a file" in the ".mce-menu.mce-in" element
And I should see "Link to external URL" in the ".mce-menu.mce-in" element
And I should see "Anchor on a page" in the ".mce-menu.mce-in" element
And I should see "Link to email address" in the ".mce-menu.mce-in" element
And I click on the "#Form_ElementForm_1 button[aria-label^='Insert link']" element
Then I should see "Page on this site" in the ".tox-menu" element
And I should see "Link to a file" in the ".tox-menu" element
And I should see "Link to external URL" in the ".tox-menu" element
And I should see "Anchor on a page" in the ".tox-menu" element
And I should see "Link to email address" in the ".tox-menu" element
# Check the link menu in the WYSIWYG "insert link" button is correct for block 2
When I click on block 2
# In CI, the mouse position just happens to produce a tooltip that stops us clicking on the insert link button
# so we have to move the mouse somewhere else to avoid that
And I click on the "input[type='text']" element
And I click on the "#Form_ElementForm_2 [aria-label^='Insert link'] button" element
Then I should see "Page on this site" in the ".mce-menu.mce-in" element
And I should see "Link to a file" in the ".mce-menu.mce-in" element
And I should see "Link to external URL" in the ".mce-menu.mce-in" element
And I should see "Anchor on a page" in the ".mce-menu.mce-in" element
And I should see "Link to email address" in the ".mce-menu.mce-in" element
And I click on the "#Form_ElementForm_2 button[aria-label^='Insert link']" element
Then I should see "Page on this site" in the ".tox-menu" element
And I should see "Link to a file" in the ".tox-menu" element
And I should see "Link to external URL" in the ".tox-menu" element
And I should see "Anchor on a page" in the ".tox-menu" element
And I should see "Link to email address" in the ".tox-menu" element
# Check the content of both WYSIWYG fields is correct
And the "Content" field for block 1 should contain "<p>Some content</p>"
And the "Content" field for block 2 should contain "<p>completely different stuff</p>"
Expand Down

0 comments on commit 7c6c107

Please sign in to comment.