Skip to content

Commit

Permalink
replace mnemonic tables' labels with md5 strings in all behat tests
Browse files Browse the repository at this point in the history
  • Loading branch information
semteacher committed Nov 29, 2023
1 parent ad5d40b commit 21912c9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
19 changes: 10 additions & 9 deletions tests/behat/filtering.feature
Original file line number Diff line number Diff line change
Expand Up @@ -133,28 +133,29 @@ Feature: Filtering functionality of wunderbyte_table works as expected
And I follow "Demo table 4"
And I press "asidecollapse-7ef0620c51db513cad089dcd596522bc"
And I should see "Teacher" in the "#7ef0620c51db513cad089dcd596522bc_r3" "css_element"
And I click on ".7ef0620c51db513cad089dcd596522bc [aria-controls=\"id_collapse_firstname\"]" "css_element"
And I should see "Teacher" in the ".7ef0620c51db513cad089dcd596522bc #id_collapse_firstname" "css_element"
And I set the field "Teacher" in the ".7ef0620c51db513cad089dcd596522bc #id_collapse_firstname" "css_element" to "checked"
##And I press "filterbtn-7ef0620c51db513cad089dcd596522bc"
And I click on ".tab-pane.active [aria-controls=\"id_collapse_firstname\"]" "css_element"
And I should see "Teacher" in the ".tab-pane.active #id_collapse_firstname" "css_element"
And I set the field "Teacher" in the ".tab-pane.active #id_collapse_firstname" "css_element" to "checked"
And I wait until the page is ready
And I should see "Teacher" in the "#7ef0620c51db513cad089dcd596522bc_r1" "css_element"
And "//*[contains(@id, '7ef0620c51db513cad089dcd596522bc')]//tr[@id, '7ef0620c51db513cad089dcd596522bc_r2']" "xpath_element" should not exist
## Filter panel being hidden by default on the Users tab
And I follow "Demo table 1"
And I should see "guest" in the "#fa5e95f7721ad449d1cdd30f461d1cec_r2" "css_element"
And I click on "[aria-controls=\"id_collapse_username\"]" "css_element"
And I should see "admin" in the "#id_collapse_username" "css_element"
And I set the field "admin" in the "#id_collapse_username" "css_element" to "checked"
And I click on ".tab-pane.active [aria-controls=\"id_collapse_username\"]" "css_element"
And I should see "admin" in the ".tab-pane.active #id_collapse_username" "css_element"
And I set the field "admin" in the ".tab-pane.active #id_collapse_username" "css_element" to "checked"
And I wait "1" seconds
And I should see "admin" in the "#fa5e95f7721ad449d1cdd30f461d1cec_r1" "css_element"
And "//*[contains(@id, 'fa5e95f7721ad449d1cdd30f461d1cec')]//tr[@id, 'fa5e95f7721ad449d1cdd30f461d1cec_r2']" "xpath_element" should not exist
## Filter panel being hidden by default on the Course tab
And I follow "Demo table 2"
And I press "asidecollapse-d82aa03a37e6ab3d58369289ffadc665"
And I should see "Course 1" in the "#d82aa03a37e6ab3d58369289ffadc665_r2" "css_element"
And I click on "[aria-controls=\"id_collapse_fullname\"]" "css_element"
And I should see "Course 1" in the "#id_collapse_fullname" "css_element"
And I set the field "Course 1" in the "#id_collapse_fullname" "css_element" to "checked"
And I click on ".tab-pane.active [aria-controls=\"id_collapse_fullname\"]" "css_element"
And I should see "Course 1" in the ".tab-pane.active #id_collapse_fullname" "css_element"
And I set the field "Course 1" in the ".tab-pane.active #id_collapse_fullname" "css_element" to "checked"
And I wait "1" seconds
And I should see "Course 1" in the "#d82aa03a37e6ab3d58369289ffadc665_r1" "css_element"
And "//*[contains(@id, 'd82aa03a37e6ab3d58369289ffadc665')]//tr[@id, 'd82aa03a37e6ab3d58369289ffadc665_r2']" "xpath_element" should not exist
2 changes: 1 addition & 1 deletion tests/behat/filtering_timespan.feature
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Feature: Timespan filtering functionality of wunderbyte_table works as expected
When I visit "/local/wunderbyte_table/demo.php"
And I follow "Demo table 2"
## Filter panel being hidden by default on the Course tab
And I press "asidecollapse-Coud82aa03a37e6ab3d58369289ffadc665rse"
And I press "asidecollapse-d82aa03a37e6ab3d58369289ffadc665"
And I should see "Course 1" in the "#d82aa03a37e6ab3d58369289ffadc665_r2" "css_element"
And I click on "[aria-controls=\"id_collapse_enddate\"]" "css_element"
And I set the field "enddate_single-date" in the "#id_collapse_enddate" "css_element" to "2023-05-13"
Expand Down
4 changes: 2 additions & 2 deletions tests/behat/row_controls.feature
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ Feature: Row controls functionality of wunderbyte_table works as expected
And I should see "Did work" in the "#user-notifications" "css_element"
And I follow "Demo table 2"
And I wait "1" seconds
Then I should see "Course 1" in the "#Course_r2" "css_element"
And I click on "TriggersNoModal" "link" in the "#Course_r2" "css_element"
Then I should see "Course 1" in the "#d82aa03a37e6ab3d58369289ffadc665_r2" "css_element"
And I click on "TriggersNoModal" "link" in the "#d82aa03a37e6ab3d58369289ffadc665_r2" "css_element"
And I wait "1" seconds
And I should see "Did work" in the "#user-notifications" "css_element"

Expand Down

0 comments on commit 21912c9

Please sign in to comment.