MDL-87304 mod_data: Use saveandview instead of "Save"

* As we switched "Save and add another " and "Save", Behat will click on the first
"SaveXXXX" button, and go to edit page again for a new entry. Where we were expecting
to be back to the view page.
This commit is contained in:
Laurent David
2026-01-27 13:39:20 +01:00
parent 5b135cad8d
commit 4aecf7fa37
6 changed files with 9 additions and 9 deletions
@@ -87,7 +87,7 @@ Feature: Users can use the Image gallery preset
When I press "Add entry"
And I set the field "title" to "New image"
And I set the field "description" to "This is the description for the new image."
And I press "Save"
And I press "saveandview"
Then I should see "New image"
And I should see "This is the description for the new image."
@@ -73,7 +73,7 @@ Feature: Users can use the Journal preset
When I press "Add entry"
And I set the field "Title" to "This is the title"
And I set the field "Content" to "This is the content for the new entry."
And I press "Save"
And I press "saveandview"
Then I should see "This is the title"
And I should see "This is the content for the new entry."
@@ -89,7 +89,7 @@ Feature: Users can use the Proposals preset
And I set the field "Summary" to "This is the summary for the new entry."
And I set the field "Content" to "This is the content for the new entry."
And I set the field "Status" to "Approved"
And I press "Save"
And I press "saveandview"
Then I should see "This is the title"
And I should see "Approved"
And I should see "This is the summary for the new entry."
@@ -94,7 +94,7 @@ Feature: Users can use the Resources preset
And I set the field "Description" to "This is description."
And I set the field "Web link" to "https://thisisthelink.cat"
And I set the field "Type" to "Type2"
And I press "Save"
And I press "saveandview"
Then I should see "This is the title"
And I should see "This is the author"
And I should see "https://thisisthelink.cat"
@@ -90,7 +90,7 @@ Feature: Users can be required to specify certain fields when adding entries to
| Required URL | http://example.com/ |
| Required Multimenu | 1 |
| Required Two-Option Multimenu | 1 |
When I press "Save"
When I press "saveandview"
And I select "List view" from the "jump" singleselect
Then I should not see "No entries in database"
And I should see "New entry text"
@@ -110,7 +110,7 @@ Feature: Users can be required to specify certain fields when adding entries to
| Required URL | http://example.com/ |
| Required Multimenu | 1 |
| Required Two-Option Multimenu | 1 |
When I press "Save"
When I press "saveandview"
Then the following fields match these values:
| Base Text input | |
| Latitude | 0 |
@@ -142,7 +142,7 @@ Feature: Users can be required to specify certain fields when adding entries to
| Required Multimenu | 1 |
| Required Two-Option Multimenu | 1 |
| Latitude | 20 |
When I press "Save"
When I press "saveandview"
Then I should see "Both latitude and longitude are required."
Scenario: A student filling in number and text fields with zero will not see an error.
@@ -163,7 +163,7 @@ Feature: Users can be required to specify certain fields when adding entries to
| Required URL | http://example.com/ |
| Required Multimenu | 1 |
| Required Two-Option Multimenu | 1 |
When I press "Save"
When I press "saveandview"
And I select "List view" from the "jump" singleselect
Then I should not see "No entries in database"
And I should see "Some input to allow us to submit the otherwise empty form"
@@ -87,7 +87,7 @@ Feature: Users can view and search database entries
| Test field name | Student original entry tagged |
| Test field 2 name | Student original entry tagged 2 |
And I set the field with xpath "//div[@class='datatagcontrol']//input[@type='text']" to "Tag1"
And I press "Save"
And I press "saveandview"
And I should see "Student original entry"
And I should see "Tag1" in the "div.tag_list" "css_element"
And I open the action menu in "#defaulttemplate-single" "css_element"