From 6905c1c3fe4701721647adc2e4d01d8a2f0d3cbf Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Sat, 17 Nov 2018 01:10:01 +0100 Subject: [PATCH] MDL-64066 behat: more fixes to dialog names, old "add" steps --- .../dataprivacy/tests/behat/manage_categories.feature | 4 ++-- admin/tool/lp/tests/behat/framework_crud.feature | 4 ++-- admin/tool/lp/tests/behat/user_evidence_crud.feature | 4 ++-- .../recyclebin/tests/behat/basic_functionality.feature | 2 +- mod/quiz/tests/behat/editing_add.feature | 8 ++++---- question/tests/behat/edit_questions_standard_tags.feature | 2 +- question/type/ddimageortext/tests/behat/add.feature | 2 +- question/type/ddmarker/tests/behat/add.feature | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/admin/tool/dataprivacy/tests/behat/manage_categories.feature b/admin/tool/dataprivacy/tests/behat/manage_categories.feature index 8d47ff894dd..c6f7f0ebaa0 100644 --- a/admin/tool/dataprivacy/tests/behat/manage_categories.feature +++ b/admin/tool/dataprivacy/tests/behat/manage_categories.feature @@ -12,7 +12,7 @@ Feature: Manage data categories And I press "Add category" And I set the field "Name" to "Category 1" And I set the field "Description" to "Category 1 description" - When I click on "Save" "button" in the "Delete category" "button" + When I click on "Save" "button" in the "Delete category" "dialogue" Then I should see "Category 1" in the "List of data categories" "table" And I should see "Category 1 description" in the "Category 1" "table_row" @@ -30,5 +30,5 @@ Feature: Manage data categories And I choose "Delete" in the open action menu And I should see "Delete category" And I should see "Are you sure you want to delete the category 'Category 1'?" - When I click on "Delete" "button" in the "Confirm" "button" + When I click on "Delete" "button" in the "Confirm" "dialogue" Then I should not see "Category 1" in the "List of data categories" "table" diff --git a/admin/tool/lp/tests/behat/framework_crud.feature b/admin/tool/lp/tests/behat/framework_crud.feature index 998a950fc02..df34c228979 100644 --- a/admin/tool/lp/tests/behat/framework_crud.feature +++ b/admin/tool/lp/tests/behat/framework_crud.feature @@ -61,10 +61,10 @@ Feature: Manage competency frameworks And "Confirm" "dialogue" should be visible And "Delete" "button" should exist in the "Confirm" "dialogue" And "Cancel" "button" should exist in the "Confirm" "dialogue" - And I click on "Cancel" "button" + And I click on "Cancel" "button" in the "Confirm" "dialogue" And I click on "Delete" of edit menu in the "Science Year-4" row And "Confirm" "dialogue" should be visible - When I click on "Delete" "button" + When I click on "Delete" "button" in the "Confirm" "dialogue" Then I should not see "Science Year-4" And I should not see "sc-y-4" diff --git a/admin/tool/lp/tests/behat/user_evidence_crud.feature b/admin/tool/lp/tests/behat/user_evidence_crud.feature index e39707a34cb..6effaae37d4 100644 --- a/admin/tool/lp/tests/behat/user_evidence_crud.feature +++ b/admin/tool/lp/tests/behat/user_evidence_crud.feature @@ -53,10 +53,10 @@ Feature: Manage evidence of prior learning And I follow "Evidence of prior learning" And I should see "List of evidence" And I click on "Delete" of edit menu in the "Evidence-4" row - And I click on "Cancel" "button" + And I click on "Cancel" "button" in the "Confirm" "dialogue" And I click on "Delete" of edit menu in the "Evidence-4" row And "Confirm" "dialogue" should be visible - When I click on "Delete" "button" + When I click on "Delete" "button" in the "Confirm" "dialogue" And I wait until the page is ready Then I should not see "Evidence-4" diff --git a/admin/tool/recyclebin/tests/behat/basic_functionality.feature b/admin/tool/recyclebin/tests/behat/basic_functionality.feature index 744b6d070f6..4d0c7f2270f 100644 --- a/admin/tool/recyclebin/tests/behat/basic_functionality.feature +++ b/admin/tool/recyclebin/tests/behat/basic_functionality.feature @@ -120,7 +120,7 @@ Feature: Basic recycle bin functionality And I should see "Test assign 2" When I click on "Delete all" "link" Then I should see "Are you sure you want to delete all items from the recycle bin?" - And I click on "Cancel" "button" in the "Add restriction..." "dialogue" + And I click on "Cancel" "button" in the "Confirmation" "dialogue" And I should see "Test assign 1" And I should see "Test assign 2" And I click on "Delete all" "link" diff --git a/mod/quiz/tests/behat/editing_add.feature b/mod/quiz/tests/behat/editing_add.feature index ac084ded83d..3888204dc8c 100644 --- a/mod/quiz/tests/behat/editing_add.feature +++ b/mod/quiz/tests/behat/editing_add.feature @@ -143,7 +143,7 @@ Feature: Edit quiz page - adding things And I set the field "Select a category:" to "Subcat 1" When I press "Create a new question ..." And I set the field "item_qtype_essay" to "1" - And I press "Add" + And I click on "Add" "button" in the "Choose a question type to add" "dialogue" Then I should see "Adding an Essay question" And I set the field "Question name" to "Essay 02" And I set the field "Question text" to "Please write 200 words about Essay 02" @@ -156,7 +156,7 @@ Feature: Edit quiz page - adding things And I wait until the page is ready When I press "Create a new question ..." And I set the field "item_qtype_essay" to "1" - And I press "Add" + And I click on "Add" "button" in the "Choose a question type to add" "dialogue" Then I should see "Adding an Essay question" And I set the field "Question name" to "Essay 03" And I set the field "Question text" to "Please write 300 words about Essay 03" @@ -167,7 +167,7 @@ Feature: Edit quiz page - adding things # Create the TF 01 question. When I press "Create a new question ..." And I set the field "item_qtype_truefalse" to "1" - And I press "Add" + And I click on "Add" "button" in the "Choose a question type to add" "dialogue" Then I should see "Adding a True/False question" And I set the field "Question name" to "TF 01" And I set the field "Question text" to "The correct answer is true" @@ -179,7 +179,7 @@ Feature: Edit quiz page - adding things # Create the TF 02 question. When I press "Create a new question ..." And I set the field "item_qtype_truefalse" to "1" - And I press "Add" + And I click on "Add" "button" in the "Choose a question type to add" "dialogue" Then I should see "Adding a True/False question" And I set the field "Question name" to "TF 02" And I set the field "Question text" to "The correct answer is false" diff --git a/question/tests/behat/edit_questions_standard_tags.feature b/question/tests/behat/edit_questions_standard_tags.feature index 8dce668dc24..c6307015d16 100644 --- a/question/tests/behat/edit_questions_standard_tags.feature +++ b/question/tests/behat/edit_questions_standard_tags.feature @@ -25,7 +25,7 @@ Feature: The questions can be tagged And I navigate to "Question bank > Questions" in current page administration And I press "Create a new question ..." And I set the field "item_qtype_truefalse" to "1" - And I click on "Add" "button" in the "Confirm" "dialogue" + And I click on "Add" "button" in the "Choose a question type to add" "dialogue" And I expand all fieldsets And I open the autocomplete suggestions list Then "foo" "autocomplete_suggestions" should exist diff --git a/question/type/ddimageortext/tests/behat/add.feature b/question/type/ddimageortext/tests/behat/add.feature index 127e9f5fc60..46b95589735 100644 --- a/question/type/ddimageortext/tests/behat/add.feature +++ b/question/type/ddimageortext/tests/behat/add.feature @@ -22,7 +22,7 @@ Feature: Test creating a drag and drop onto image question Scenario: Create a drag and drop onto image question When I press "Create a new question ..." And I set the field "Drag and drop onto image" to "1" - And I click on "Add" "button" in the "Choose a new question type to add" "dialogue" + And I click on "Add" "button" in the "Choose a question type to add" "dialogue" And I set the field "Question name" to "Drag and drop onto image 001" And I set the field "Question text" to "Identify the features in this cross-section." And I set the field "General feedback" to "The locations are now labelled on the diagram below." diff --git a/question/type/ddmarker/tests/behat/add.feature b/question/type/ddmarker/tests/behat/add.feature index b6c61b41ea2..733e457233d 100644 --- a/question/type/ddmarker/tests/behat/add.feature +++ b/question/type/ddmarker/tests/behat/add.feature @@ -22,7 +22,7 @@ Feature: Test creating a drag and drop markers question Scenario: Create a drag and drop markers question When I press "Create a new question ..." And I set the field "Drag and drop markers" to "1" - And I click on "Add" "button" in the "Confirm" "dialogue" + And I click on "Add" "button" in the "Choose a question type to add" "dialogue" And I set the field "Question name" to "Drag and drop markers" And I set the field "Question text" to "Please place the markers on the map of Milton Keynes and be aware that there is more than one railway station." And I set the field "General feedback" to "The Open University is at the junction of Brickhill Street and Groveway. There are three railway stations, Wolverton, Milton Keynes Central and Bletchley."