MOBILE-4600 data: Fix related behat tests

main
Pau Ferrer Ocaña 2024-05-24 13:35:35 +02:00
parent a8bbab2363
commit 0771ccc278
3 changed files with 44 additions and 18 deletions

View File

@ -59,7 +59,8 @@ Feature: Users can manage entries in database activities
| URL | https://moodlecloud.com/ | | URL | https://moodlecloud.com/ |
| Description | Moodle Cloud | | Description | Moodle Cloud |
And I press "Save" near "Web links" in the app And I press "Save" near "Web links" in the app
And I press "Show more" near "Moodle community site" in the app And I press "Actions menu" near "Moodle community site" in the app
And I press "Show more" in the app
Then I should find "Moodle community site" in the app Then I should find "Moodle community site" in the app
And I should not find "Comments" in the app And I should not find "Comments" in the app
And I should be able to press "Previous" in the app And I should be able to press "Previous" in the app
@ -83,14 +84,16 @@ Feature: Users can manage entries in database activities
And I set the following fields to these values in the app: And I set the following fields to these values in the app:
| Description | Moodle community site | | Description | Moodle community site |
And I press "Save" near "Data with comments" in the app And I press "Save" near "Data with comments" in the app
And I press "Show more" near "Moodle community site" in the app And I press "Actions menu" near "Moodle community site" in the app
And I press "Show more" in the app
Then I should find "Moodle community site" in the app Then I should find "Moodle community site" in the app
And I should find "Comments" in the app And I should find "Comments" in the app
Given the following config values are set as admin: Given the following config values are set as admin:
| usecomments | 0 | | usecomments | 0 |
And I entered the data activity "Data with comments" on course "Course 1" as "student1" in the app And I entered the data activity "Data with comments" on course "Course 1" as "student1" in the app
When I press "Show more" near "Moodle community site" in the app When I press "Actions menu" near "Moodle community site" in the app
And I press "Show more" in the app
Then I should not find "Comments" in the app Then I should not find "Comments" in the app
But the following events should have been logged for "student1" in the app: But the following events should have been logged for "student1" in the app:
| name | activity | activityname | course | | name | activity | activityname | course |
@ -106,9 +109,11 @@ Feature: Users can manage entries in database activities
And I press "Save" near "Web links" in the app And I press "Save" near "Web links" in the app
And I entered the course "Course 1" as "student2" in the app And I entered the course "Course 1" as "student2" in the app
When I press "Web links" near "General" in the app When I press "Web links" near "General" in the app
And I press "Actions menu" in the app
Then "Edit" "link" should not exist Then "Edit" "link" should not exist
And "Delete" "link" should not exist And "Delete" "link" should not exist
And I press "Show more" in the app When I press "Show more" in the app
And "Actions menu" "link" should not exist
And "Edit" "link" should not exist And "Edit" "link" should not exist
And "Delete" "link" should not exist And "Delete" "link" should not exist
@ -121,7 +126,8 @@ Feature: Users can manage entries in database activities
And I press "Save" near "Web links" in the app And I press "Save" near "Web links" in the app
# Edit the entry from list view. # Edit the entry from list view.
When I press "Edit" in the app When I press "Actions menu" in the app
And I press "Edit" in the app
And I set the following fields to these values in the app: And I set the following fields to these values in the app:
| URL | https://moodlecloud.com/ | | URL | https://moodlecloud.com/ |
| Description | Moodle Cloud | | Description | Moodle Cloud |
@ -132,11 +138,13 @@ Feature: Users can manage entries in database activities
And I should find "Moodle Cloud" in the app And I should find "Moodle Cloud" in the app
# Delete the entry from list view. # Delete the entry from list view.
When I press "Delete" in the app When I press "Actions menu" in the app
And I press "Delete" in the app
Then I should find "Are you sure you want to delete this entry?" in the app Then I should find "Are you sure you want to delete this entry?" in the app
And I press "Cancel" in the app And I press "Cancel" in the app
And I should find "Moodle Cloud" in the app And I should find "Moodle Cloud" in the app
When I press "Delete" in the app When I press "Actions menu" in the app
And I press "Delete" in the app
Then I should find "Are you sure you want to delete this entry?" in the app Then I should find "Are you sure you want to delete this entry?" in the app
And I press "Delete" in the app And I press "Delete" in the app
And I should not find "Moodle Cloud" in the app And I should not find "Moodle Cloud" in the app
@ -149,7 +157,9 @@ Feature: Users can manage entries in database activities
And I press "Save" near "Web links" in the app And I press "Save" near "Web links" in the app
# Edit the entry from single view. # Edit the entry from single view.
When I press "Show more" in the app When I press "Actions menu" in the app
And I press "Show more" in the app
And I press "Actions menu" in the app
And I press "Edit" in the app And I press "Edit" in the app
And I set the following fields to these values in the app: And I set the following fields to these values in the app:
| URL | https://moodlecloud.com/ | | URL | https://moodlecloud.com/ |
@ -161,11 +171,13 @@ Feature: Users can manage entries in database activities
And I should find "Moodle Cloud" in the app And I should find "Moodle Cloud" in the app
# Delete the entry from list view. # Delete the entry from list view.
When I press "Delete" in the app When I press "Actions menu" in the app
And I press "Delete" in the app
Then I should find "Are you sure you want to delete this entry?" in the app Then I should find "Are you sure you want to delete this entry?" in the app
And I press "Cancel" in the app And I press "Cancel" in the app
And I should find "Moodle Cloud" in the app And I should find "Moodle Cloud" in the app
When I press "Delete" in the app When I press "Actions menu" in the app
And I press "Delete" in the app
Then I should find "Are you sure you want to delete this entry?" in the app Then I should find "Are you sure you want to delete this entry?" in the app
And I press "Delete" in the app And I press "Delete" in the app
And I should not find "Moodle Cloud" in the app And I should not find "Moodle Cloud" in the app
@ -190,7 +202,8 @@ Feature: Users can manage entries in database activities
And I should find "Moodle community site" in the app And I should find "Moodle community site" in the app
# Edit the entry from list view. # Edit the entry from list view.
When I press "Edit" near "Moodle community site" in the app When I press "Actions menu" near "Moodle community site" in the app
And I press "Edit" in the app
And I set the following fields to these values in the app: And I set the following fields to these values in the app:
| URL | https://moodlecloud.com/ | | URL | https://moodlecloud.com/ |
| Description | Moodle Cloud | | Description | Moodle Cloud |
@ -201,19 +214,23 @@ Feature: Users can manage entries in database activities
And I should find "Moodle Cloud" in the app And I should find "Moodle Cloud" in the app
# Delete the entry from list view. # Delete the entry from list view.
When I press "Delete" near "Moodle Cloud" in the app When I press "Actions menu" near "Moodle Cloud" in the app
And I press "Delete" in the app
Then I should find "Are you sure you want to delete this entry?" in the app Then I should find "Are you sure you want to delete this entry?" in the app
And I press "Cancel" in the app And I press "Cancel" in the app
And I should find "Moodle Cloud" in the app And I should find "Moodle Cloud" in the app
When I press "Delete" near "Moodle Cloud" in the app When I press "Actions menu" near "Moodle Cloud" in the app
And I press "Delete" in the app
Then I should find "Are you sure you want to delete this entry?" in the app Then I should find "Are you sure you want to delete this entry?" in the app
And I press "Delete" in the app And I press "Delete" in the app
And I should not find "Moodle Cloud" in the app And I should not find "Moodle Cloud" in the app
# Edit the entry from single view. # Edit the entry from single view.
When I press "Show more" in the app When I press "Actions menu" in the app
And I press "Show more" in the app
And I should find "https://telegram.org/" in the app And I should find "https://telegram.org/" in the app
And I should find "Telegram" in the app And I should find "Telegram" in the app
And I press "Actions menu" in the app
And I press "Edit" in the app And I press "Edit" in the app
And I set the following fields to these values in the app: And I set the following fields to these values in the app:
| URL | https://moodlecloud.com/ | | URL | https://moodlecloud.com/ |
@ -225,11 +242,13 @@ Feature: Users can manage entries in database activities
And I should find "Moodle Cloud" in the app And I should find "Moodle Cloud" in the app
# Delete the entry from single view. # Delete the entry from single view.
When I press "Delete" in the app When I press "Actions menu" in the app
And I press "Delete" in the app
Then I should find "Are you sure you want to delete this entry?" in the app Then I should find "Are you sure you want to delete this entry?" in the app
And I press "Cancel" in the app And I press "Cancel" in the app
And I should find "Moodle Cloud" in the app And I should find "Moodle Cloud" in the app
When I press "Delete" in the app When I press "Actions menu" in the app
And I press "Delete" in the app
Then I should find "Are you sure you want to delete this entry?" in the app Then I should find "Are you sure you want to delete this entry?" in the app
And I press "Delete" in the app And I press "Delete" in the app
And I should not find "Moodle Cloud" in the app And I should not find "Moodle Cloud" in the app
@ -250,5 +269,5 @@ Feature: Users can manage entries in database activities
And I set the following fields to these values in the app: And I set the following fields to these values in the app:
| Number | 0 | | Number | 0 |
And I press "Save" near "Number DB" in the app And I press "Save" near "Number DB" in the app
Then I should find "0" near "Number:" in the app Then I should find "0" in the app
But I should not find "Save" in the app But I should not find "Save" in the app

View File

@ -61,7 +61,8 @@ Feature: Users can store entries in database activities when offline and sync wh
And I wait until the page is ready And I wait until the page is ready
And I close the popup in the app And I close the popup in the app
And I switch network connection to offline And I switch network connection to offline
When I press "Edit" in the app When I press "Actions menu" in the app
And I press "Edit" in the app
And I set the following fields to these values in the app: And I set the following fields to these values in the app:
| URL | https://moodlecloud.com/ | | URL | https://moodlecloud.com/ |
| Description | Moodle Cloud | | Description | Moodle Cloud |
@ -83,6 +84,7 @@ Feature: Users can store entries in database activities when offline and sync wh
And I press "Refresh" in the app And I press "Refresh" in the app
And I wait until the page is ready And I wait until the page is ready
And I switch network connection to offline And I switch network connection to offline
And I press "Actions menu" in the app
And I press "Delete" in the app And I press "Delete" in the app
And I should find "Are you sure you want to delete this entry?" in the app And I should find "Are you sure you want to delete this entry?" in the app
And I press "Delete" in the app And I press "Delete" in the app
@ -111,12 +113,14 @@ Feature: Users can store entries in database activities when offline and sync wh
And I wait until the page is ready And I wait until the page is ready
And I close the popup in the app And I close the popup in the app
When I switch network connection to offline When I switch network connection to offline
And I press "Actions menu" in the app
And I press "Delete" in the app And I press "Delete" in the app
And I should find "Are you sure you want to delete this entry?" in the app And I should find "Are you sure you want to delete this entry?" in the app
And I press "Delete" in the app And I press "Delete" in the app
And I should find "https://moodle.org/" in the app And I should find "https://moodle.org/" in the app
And I should find "Moodle community site" in the app And I should find "Moodle community site" in the app
And I should find "This Database has offline data to be synchronised" in the app And I should find "This Database has offline data to be synchronised" in the app
And I press "Actions menu" in the app
And I press "Restore" in the app And I press "Restore" in the app
And I press the back button in the app And I press the back button in the app
And I switch network connection to wifi And I switch network connection to wifi

View File

@ -33,6 +33,7 @@ Feature: Test basic usage of comments in app
And I press "Add entries" in the app And I press "Add entries" in the app
And I set the field "Test field name" to "Test" in the app And I set the field "Test field name" to "Test" in the app
And I press "Save" in the app And I press "Save" in the app
And I press "Actions menu" in the app
And I press "Show more" in the app And I press "Show more" in the app
And I press "Comments (0)" in the app And I press "Comments (0)" in the app
And I set the field "Add a comment..." to "comment test teacher" in the app And I set the field "Add a comment..." to "comment test teacher" in the app
@ -45,6 +46,7 @@ Feature: Test basic usage of comments in app
# Create and delete comments as a student # Create and delete comments as a student
Given I entered the data activity "Data" on course "Course 1" as "student1" in the app Given I entered the data activity "Data" on course "Course 1" as "student1" in the app
And I press "Actions menu" in the app
And I press "Show more" in the app And I press "Show more" in the app
And I press "Comments (1)" in the app And I press "Comments (1)" in the app
And I set the field "Add a comment..." to "comment test student" in the app And I set the field "Add a comment..." to "comment test student" in the app
@ -70,6 +72,7 @@ Feature: Test basic usage of comments in app
And I press "Add entries" in the app And I press "Add entries" in the app
And I set the field "Test field name" to "Test" in the app And I set the field "Test field name" to "Test" in the app
And I press "Save" in the app And I press "Save" in the app
And I press "Actions menu" in the app
And I press "Show more" in the app And I press "Show more" in the app
And I press "Comments (0)" in the app And I press "Comments (0)" in the app
And I switch network connection to offline And I switch network connection to offline