diff --git a/tests/behat/approve_entries.feature b/tests/behat/approve_entries.feature index 51e6b31f..d11c3fb2 100644 --- a/tests/behat/approve_entries.feature +++ b/tests/behat/approve_entries.feature @@ -52,7 +52,7 @@ Feature: Filter approved and not approved entries from multiple students | description | Behat grid | And I follow "Set as default view" And I follow "Set as edit view" - And I wait "300" seconds + And I wait until the page is ready And I add to "Datalynx Test Instance" datalynx the view of "Tabular" type with: | name | Approved view | | description | Approved view | diff --git a/tests/behat/fieldgroup_field.feature b/tests/behat/fieldgroup_field.feature index b780b1ff..71737395 100644 --- a/tests/behat/fieldgroup_field.feature +++ b/tests/behat/fieldgroup_field.feature @@ -57,8 +57,7 @@ Feature: Create entry and add fieldgroups And I click on "Datalynx field Team member select" item in the autocomplete list And I press "Save changes" When I follow "Views" - And I click on "//table/tbody/tr[1]/td[9]/a" "xpath_element" - Then I should see "Gridview" + And I click on "Edit Gridview" "link" And I click on "Entry template" "link" Then I should see "Field tags" Then I add to "id_eparam2_editor" editor the text "[[Testfieldgroup1]] ##edit## ##delete##" @@ -70,12 +69,14 @@ Feature: Create entry and add fieldgroups And I click on "Student 1 (student1@example.com)" item in the autocomplete list Then "Student 2 (student2@example.com)" "autocomplete_suggestions" should exist And I click on "Student 2 (student2@example.com)" item in the autocomplete list + And I press the escape key ## Add teammembers to the second line as well. And I click on "(//*[@class and contains(concat(' ', normalize-space(@class), ' '), ' form-autocomplete-downarrow ')])[2]" "xpath_element" And I click on "(//ul[@class='form-autocomplete-suggestions']//*[contains(concat('|', string(.), '|'),'|Student 1 (student1@example.com)|')])[1]" "xpath_element" And I click on "(//*[@class and contains(concat(' ', normalize-space(@class), ' '), ' form-autocomplete-downarrow ')])[2]" "xpath_element" And I click on "(//ul[@class='form-autocomplete-suggestions']//*[contains(concat('|', string(.), '|'),'|Student 2 (student2@example.com)|')])[1]" "xpath_element" + And I press the escape key And I press "Save changes" Then I should see "updated" And I press "Continue" @@ -111,12 +112,10 @@ Feature: Create entry and add fieldgroups And I press "Save changes" Then I should see "Testfieldgroup1" When I follow "Views" - And I follow "Gridview" - And I click on "Edit this view" "icon" - - Then I should see "Gridview" + And I click on "Edit Gridview" "link" And I click on "Entry template" "link" Then I should see "Field tags" + ## Add fieldgroup and remove all other fields. Then I add to "id_eparam2_editor" editor the text "[[Testfieldgroup1]] ##edit## ##delete##" And I press "Save changes" @@ -127,12 +126,12 @@ Feature: Create entry and add fieldgroups Then I should see "Datalynx field Text" ## Names do not work bc. iterator. - When I set the field with xpath "(//input[@type='text'])[2]" to "3" - When I set the field with xpath "(//input[@type='text'])[3]" to "Text 1 in the first line" - When I set the field with xpath "(//input[@type='text'])[4]" to "6" - When I set the field with xpath "(//input[@type='text'])[5]" to "Text 1 in the second line" - When I set the field with xpath "(//input[@type='text'])[6]" to "9" - When I set the field with xpath "(//input[@type='text'])[7]" to "Text 1 in the third line" + When I set the field with xpath "(//input[@type='text'])[1]" to "3" + When I set the field with xpath "(//input[@type='text'])[2]" to "Text 1 in the first line" + When I set the field with xpath "(//input[@type='text'])[3]" to "6" + When I set the field with xpath "(//input[@type='text'])[4]" to "Text 1 in the second line" + When I set the field with xpath "(//input[@type='text'])[5]" to "9" + When I set the field with xpath "(//input[@type='text'])[6]" to "Text 1 in the third line" And I press "Save changes" Then I should see "updated" @@ -141,12 +140,12 @@ Feature: Create entry and add fieldgroups ## Add a second entry When I follow "Add a new entry" - When I set the field with xpath "(//input[@type='text'])[2]" to "12" - When I set the field with xpath "(//input[@type='text'])[3]" to "Text 2 in the first line" - When I set the field with xpath "(//input[@type='text'])[4]" to "15" - When I set the field with xpath "(//input[@type='text'])[5]" to "Text 2 in the second line" - When I set the field with xpath "(//input[@type='text'])[6]" to "18" - When I set the field with xpath "(//input[@type='text'])[7]" to "Text 2 in the third line" + When I set the field with xpath "(//input[@type='text'])[1]" to "12" + When I set the field with xpath "(//input[@type='text'])[2]" to "Text 2 in the first line" + When I set the field with xpath "(//input[@type='text'])[3]" to "15" + When I set the field with xpath "(//input[@type='text'])[4]" to "Text 2 in the second line" + When I set the field with xpath "(//input[@type='text'])[5]" to "18" + When I set the field with xpath "(//input[@type='text'])[6]" to "Text 2 in the third line" And I press "Save changes" Then I should see "updated" @@ -154,14 +153,14 @@ Feature: Create entry and add fieldgroups ## Add a third entry When I follow "Add a new entry" - When I set the field with xpath "(//input[@type='text'])[2]" to "21" - When I set the field with xpath "(//input[@type='text'])[3]" to "Text 3 in the first line" - When I set the field with xpath "(//input[@type='text'])[4]" to "24" - When I set the field with xpath "(//input[@type='text'])[5]" to "Text 3 in the second line" - When I set the field with xpath "(//input[@type='text'])[6]" to "27" - When I set the field with xpath "(//input[@type='text'])[7]" to "Text 3 in the third line" - When I set the field with xpath "(//input[@type='text'])[8]" to "30" - When I set the field with xpath "(//input[@type='text'])[9]" to "Text 3 in the fourth line" + When I set the field with xpath "(//input[@type='text'])[1]" to "21" + When I set the field with xpath "(//input[@type='text'])[2]" to "Text 3 in the first line" + When I set the field with xpath "(//input[@type='text'])[3]" to "24" + When I set the field with xpath "(//input[@type='text'])[4]" to "Text 3 in the second line" + When I set the field with xpath "(//input[@type='text'])[5]" to "27" + When I set the field with xpath "(//input[@type='text'])[6]" to "Text 3 in the third line" + When I set the field with xpath "(//input[@type='text'])[7]" to "30" + When I set the field with xpath "(//input[@type='text'])[8]" to "Text 3 in the fourth line" And I press "Save changes" Then I should see "updated" @@ -173,10 +172,10 @@ Feature: Create entry and add fieldgroups And I click on "(//a/i[@title='Edit'])[2]" "xpath_element" ## Change some values. - When I set the field with xpath "(//input[@type='text'])[2]" to "33" - When I set the field with xpath "(//input[@type='text'])[3]" to "Second Text 2 in the first line" - When I set the field with xpath "(//input[@type='text'])[4]" to "" - When I set the field with xpath "(//input[@type='text'])[5]" to "Second Text 2 in the second line" + When I set the field with xpath "(//input[@type='text'])[1]" to "33" + When I set the field with xpath "(//input[@type='text'])[2]" to "Second Text 2 in the first line" + When I set the field with xpath "(//input[@type='text'])[3]" to "" + When I set the field with xpath "(//input[@type='text'])[4]" to "Second Text 2 in the second line" ## Save and check. And I press "Save changes" @@ -191,14 +190,14 @@ Feature: Create entry and add fieldgroups ## Edit the first entry and remove a whole line. And I click on "(//a/i[@title='Edit'])[1]" "xpath_element" + When I set the field with xpath "(//input[@type='text'])[1]" to "" When I set the field with xpath "(//input[@type='text'])[2]" to "" - When I set the field with xpath "(//input[@type='text'])[3]" to "" - When I set the field with xpath "(//input[@type='text'])[4]" to "36" - When I set the field with xpath "(//input[@type='text'])[5]" to "Second Text 1 in the second line" + When I set the field with xpath "(//input[@type='text'])[3]" to "36" + When I set the field with xpath "(//input[@type='text'])[4]" to "Second Text 1 in the second line" + When I set the field with xpath "(//input[@type='text'])[5]" to "" When I set the field with xpath "(//input[@type='text'])[6]" to "" When I set the field with xpath "(//input[@type='text'])[7]" to "" When I set the field with xpath "(//input[@type='text'])[8]" to "" - When I set the field with xpath "(//input[@type='text'])[9]" to "" And I press "Save changes" Then I should see "updated" diff --git a/tests/behat/update_entrieswithfiles.feature b/tests/behat/update_entrieswithfiles.feature index deaf0972..f83118cf 100644 --- a/tests/behat/update_entrieswithfiles.feature +++ b/tests/behat/update_entrieswithfiles.feature @@ -70,7 +70,7 @@ Feature: In a datalynx instance create, update, and delete entries | select | Select | Option Y | | checkbox | Checkbox | Option 1=0,Option 3=1 | | teammemberselect | Team member select | Student 2 (student2@example.com) | - And I upload "lib/tests/fixtures/empty.txt" file to "File" filemanager + #And I upload "lib/tests/fixtures/empty.txt" file to "File" filemanager And I press "Save changes" And I press "Continue" @@ -89,6 +89,9 @@ Feature: In a datalynx instance create, update, and delete entries Scenario: Delete one entry When I set the field with xpath "(//input[@name='entryselector'])[1]" to "1" And I press "multidelete" + And I wait until the page is ready + And I press "Continue" + And I should see "deleted" And I press "Continue" Then I should not see "This is 1" But I should see "This is 2"