Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNT Fix ambiguous behat test #1659

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions tests/behat/features/gridfield-toast-messages.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ Feature: Show toast messages
I want to see toast message in the CMS when I create, edit, delete, publish, unpublish, archive a record

Background:
Given the "Company" "Company A" with "Category"="Other"
Given the "Company" "Company A" with "Category"="Other"
And the "Company" "Company B" with "Category"="Other"
And the "Company" "Company C" with "Category"="Other"
And the "Employee" "Employee A" with "Company"="1"
And the "Employee" "Employee A" with "Company"="3"
And the "Employee" "Employee B" with "Company"="1"
And the "Employee" "Employee C" with "Company"="1"
And the "group" "EDITOR" has permissions "Access to 'Pages' section" and "Access to 'Test ModelAdmin' section" and "TEST_DATAOBJECT_EDIT"
Expand Down Expand Up @@ -38,7 +38,7 @@ Feature: Show toast messages
And I should see a "Archived Company "Company B"" success toast

Scenario: I can see toast message when I successfully delete a record
When I click "Company A" in the "#Form_EditForm" element
When I click "Company C" in the "#Form_EditForm" element
And I click "Employees" in the ".ui-tabs-nav" element
Then I should see "Employee A" in the "#Form_ItemEditForm_Employees" element
And I click "Employee A" in the "#Form_ItemEditForm_Employees" element
Expand All @@ -47,7 +47,7 @@ Feature: Show toast messages
Then I should not see "Employee A" in the "#Form_ItemEditForm_Employees" element

Scenario: I can see toast message when I successfully delete a record by clicking the Unlink button in action menu
When I click "Company A" in the "#Form_EditForm" element
When I click "Company C" in the "#Form_EditForm" element
And I click "Employees" in the ".ui-tabs-nav" element
Then I should see "Employee A" in the "#Form_ItemEditForm_Employees" element
And I press the "View actions" button
Expand All @@ -66,6 +66,7 @@ Feature: Show toast messages

Scenario: I can see toast message when I have validation errors
When I click "Company C" in the "#Form_EditForm" element
And I click "Main" in the ".ui-tabs-nav" element
And I fill in "Name" with ""
And I press the "Save" button
Then I should see "Validation Error"
Expand Down