diff --git a/tests/behat/block_onlinesurvey_behavior.feature.disabled b/tests/behat/block_onlinesurvey_behavior.feature.disabled deleted file mode 100644 index f4c7471..0000000 --- a/tests/behat/block_onlinesurvey_behavior.feature.disabled +++ /dev/null @@ -1,181 +0,0 @@ -@block @block_onlinesurvey @javascript @block_onlinesurvey_behavior -Feature: Configuring the behavior of the onlinesurvey block - In order to adapt the presentation of our evasys online surveys in Moodle - As admin - I want to configure the behavior of the block_onlinesurvey plugin in multiple aspects - -# This behat test feature file is fully working. -# But it needs a working evasys backend with surveys and users set up in a way as this test expects them as well. -# Because of that, the feature file is currently only shipped as disabled skeleton. - - Background: - Given the following config values are set as admin: - | config | value | plugin | - | presentation | brief | block_onlinesurvey | - | survey_hide_empty | 0 | block_onlinesurvey | - | offer_zoom | 1 | block_onlinesurvey | - | show_spinner | 0 | block_onlinesurvey | - | survey_show_popupinfo | 0 | block_onlinesurvey | - And the following config values are set as admin: - | config | value | plugin | - | connectiontype | LTI | block_onlinesurvey | - | lti_url | https://[SERVERNAME]/customer/lti/lti_provider.php | block_onlinesurvey | - | lti_password | secret | block_onlinesurvey | - And the following config values are set as admin: - | config | value | - | defaulthomepage | 1 | - And the following "users" exist: - | username | email | - | student1 | student1@example.com | - | tjohnson | tjohnson@example.com | - | ethompson | ethompson@example.com | - And the following "courses" exist: - | fullname | shortname | category | - | Course 1 | C1 | 0 | - And the following "course enrolments" exist: - | user | course | role | - | student1 | C1 | student | - | tjohnson | C1 | student | - | ethompson | C1 | editingteacher | - And I log in as "admin" - And I am on site homepage - And I turn editing mode on - And I add the "Evaluations (evasys)" block - And I configure the "Evaluations (evasys)" block - And I set the following fields to these values: - | Page contexts | 2 | - And I press "Save changes" - And I turn editing mode off - And I follow "Dashboard" in the user menu - And I press "Customise this page" - And I configure the "Evaluations (evasys)" block - And I set the following fields to these values: - | Display on page types | Dashboard page | - And I press "Save changes" - And I log out - - Scenario: Change the block title - When I log in as "tjohnson" - Then "Evaluations (evasys)" "block" should exist - And I log out - And the following config values are set as admin: - | config | value | plugin | - | blocktitle | Our evasys surveys | block_onlinesurvey | - And I log in as "tjohnson" - Then "Our evasys surveys" "block" should exist - - Scenario: Display the block only when surveys are available - Given the following config values are set as admin: - | config | value | plugin | - | survey_hide_empty | 1 | block_onlinesurvey | - When I log in as "tjohnson" - Then "Evaluations (evasys)" "block" should exist - And "Evaluations (evasys)" "block" should be visible - And I log out - And I log in as "student1" - Then "Evaluations (evasys)" "block" should exist - And "Evaluations (evasys)" "block" should not be visible - - Scenario: Display the login popup when surveys are available - Given the following config values are set as admin: - | config | value | plugin | - | survey_show_popupinfo | 1 | block_onlinesurvey | - | survey_popupinfo_title | You have open surveys! | block_onlinesurvey | - | survey_popupinfo_content | Thank you for your support! | block_onlinesurvey | - When I log in as "tjohnson" - Then "Evaluations (evasys)" "block" should exist - And I wait "2" seconds - And "div.block_onlinesurvey_custom-modal_container" "css_element" should exist - And I should see "You have open surveys!" in the ".block_onlinesurvey_custom-modal_title" "css_element" - And I should see "Thank you for your support!" in the ".block_onlinesurvey_custom-modal_content" "css_element" - And I click on ".block_onlinesurvey_custom-modal_close-button" "css_element" - And I wait "2" seconds - And "div.block_onlinesurvey_custom-modal_container" "css_element" should not exist - And I log out - And I log in as "student1" - And I wait "5" seconds - And "div.block_onlinesurvey_custom-modal_container" "css_element" should not exist - - Scenario: Always offer enlarged list view in detailed mode to a user who does not have any surveys in evasys - Given the following config values are set as admin: - | config | value | plugin | - | offer_zoom | 1 | block_onlinesurvey | - | presentation | detailed | block_onlinesurvey | - When I log in as "student1" - And I switch to "block_onlinesurvey_contentframe" iframe - Then I should see "No online surveys found" - And I switch to the main frame - And "All surveys" "button" should exist - - Scenario: Always offer enlarged list view in detailed mode to a user who is a student in evasys - Given the following config values are set as admin: - | config | value | plugin | - | offer_zoom | 1 | block_onlinesurvey | - | presentation | detailed | block_onlinesurvey | - When I log in as "tjohnson" - And I switch to "block_onlinesurvey_contentframe" iframe - Then I should not see "No online surveys found" - And I switch to the main frame - And "All surveys" "button" should exist - - Scenario: Don't always offer enlarged list view in detailed mode to a user who does not have any surveys in evasys - Given the following config values are set as admin: - | config | value | plugin | - | offer_zoom | 0 | block_onlinesurvey | - | presentation | detailed | block_onlinesurvey | - When I log in as "student1" - And I switch to "block_onlinesurvey_contentframe" iframe - Then I should see "No online surveys found" - And I switch to the main frame - And "Zoom survey list" "button" should not be visible - - Scenario: Don't always offer enlarged list view in detailed mode to a user who is a student in evasys - Given the following config values are set as admin: - | config | value | plugin | - | offer_zoom | 0 | block_onlinesurvey | - | presentation | detailed | block_onlinesurvey | - When I log in as "tjohnson" - And I switch to "block_onlinesurvey_contentframe" iframe - Then I should not see "No online surveys found" - And I switch to the main frame - And "Zoom survey list" "button" should be visible - - Scenario: Always offer enlarged list view in compact mode to a user who does not have any surveys in evasys - Given the following config values are set as admin: - | config | value | plugin | - | offer_zoom | 1 | block_onlinesurvey | - | presentation | brief | block_onlinesurvey | - When I log in as "student1" - And I switch to "block_onlinesurvey_contentframe" iframe - And I should see "No open surveys available" - And ".block_onlinesurvey_compact_magnifier" "css_element" should exist - - Scenario: Always offer enlarged list view in compact mode to a user who is a student in evasys - Given the following config values are set as admin: - | config | value | plugin | - | offer_zoom | 1 | block_onlinesurvey | - | presentation | brief | block_onlinesurvey | - When I log in as "tjohnson" - And I switch to "block_onlinesurvey_contentframe" iframe - And I should not see "No open surveys available" - And ".block_onlinesurvey_compact_magnifier" "css_element" should exist - - Scenario: Don't always offer enlarged list view in compact mode to a user who does not have any surveys in evasys - Given the following config values are set as admin: - | config | value | plugin | - | offer_zoom | 0 | block_onlinesurvey | - | presentation | brief | block_onlinesurvey | - When I log in as "student1" - And I switch to "block_onlinesurvey_contentframe" iframe - And I should see "No open surveys available" - And ".block_onlinesurvey_compact_magnifier" "css_element" should not exist - - Scenario: Don't always offer enlarged list view in compact mode to a user who is a student in evasys - Given the following config values are set as admin: - | config | value | plugin | - | offer_zoom | 0 | block_onlinesurvey | - | presentation | brief | block_onlinesurvey | - When I log in as "tjohnson" - And I switch to "block_onlinesurvey_contentframe" iframe - And I should not see "No open surveys available" - And ".block_onlinesurvey_compact_magnifier" "css_element" should exist diff --git a/tests/behat/block_onlinesurvey_lti.feature.disabled b/tests/behat/block_onlinesurvey_lti.feature.disabled deleted file mode 100644 index 41b583f..0000000 --- a/tests/behat/block_onlinesurvey_lti.feature.disabled +++ /dev/null @@ -1,140 +0,0 @@ -@block @block_onlinesurvey @javascript @block_onlinesurvey_lti -Feature: Using the onlinesurvey block with the evasys LTI API - In order to provide access to our evasys online surveys - As admin - I want to configure the block_onlinesurvey plugin to connect to evasys via LTI and want to add the block to the Dashboard - -# This behat test feature file is fully working. -# But it needs a working evasys backend with surveys and users set up in a way as this test expects them as well. -# Because of that, the feature file is currently only shipped as disabled skeleton. - - Background: - Given the following config values are set as admin: - | config | value | plugin | - | presentation | brief | block_onlinesurvey | - | survey_hide_empty | 0 | block_onlinesurvey | - | offer_zoom | 1 | block_onlinesurvey | - | show_spinner | 0 | block_onlinesurvey | - | survey_show_popupinfo | 0 | block_onlinesurvey | - And the following config values are set as admin: - | config | value | plugin | - | connectiontype | LTI | block_onlinesurvey | - | lti_url | https://[SERVERNAME]/customer/lti/lti_provider.php | block_onlinesurvey | - | lti_password | secret | block_onlinesurvey | - And the following config values are set as admin: - | config | value | - | defaulthomepage | 1 | - And the following "users" exist: - | username | email | - | student1 | student1@example.com | - | tjohnson | tjohnson@example.com | - | ethompson | ethompson@example.com | - And the following "courses" exist: - | fullname | shortname | category | - | Course 1 | C1 | 0 | - And the following "course enrolments" exist: - | user | course | role | - | student1 | C1 | student | - | tjohnson | C1 | student | - | ethompson | C1 | editingteacher | - And I log in as "admin" - And I am on site homepage - And I turn editing mode on - And I add the "Evaluations (evasys)" block - And I configure the "Evaluations (evasys)" block - And I set the following fields to these values: - | Page contexts | 2 | - And I press "Save changes" - And I turn editing mode off - And I follow "Dashboard" in the user menu - And I press "Customise this page" - And I configure the "Evaluations (evasys)" block - And I set the following fields to these values: - | Display on page types | Dashboard page | - And I press "Save changes" - And I log out - - Scenario: View block in compact mode with a student who does not have any surveys in evasys - Given the following config values are set as admin: - | config | value | plugin | - | presentation | brief | block_onlinesurvey | - When I log in as "student1" - And I switch to "block_onlinesurvey_contentframe" iframe - Then I should see "No open surveys available" - - Scenario: View block in compact mode with a user who is a student in evasys - Given the following config values are set as admin: - | config | value | plugin | - | presentation | brief | block_onlinesurvey | - When I log in as "tjohnson" - And I switch to "block_onlinesurvey_contentframe" iframe - Then I should see "2" - And I should not see "No open surveys available" - And I should see "Open surveys available" - And I click on "#block_onlinesurvey_area" "css_element" - And I wait "2" seconds - And I switch to the main frame - And "div.block_onlinesurvey_custom-modal_container" "css_element" should exist - And I switch to "block_onlinesurvey_custom-modal_contentframe" iframe - And I should see "My Survey Dashboard" - And I should see "Environmental Design" - And I should see "Design Projects" - And I switch to the main frame - And I click on ".block_onlinesurvey_custom-modal_close-button" "css_element" - And I wait "2" seconds - And "div.block_onlinesurvey_custom-modal_container" "css_element" should not exist - - Scenario: View block in compact mode with a user who is a teacher in evasys - Given the following config values are set as admin: - | config | value | plugin | - | presentation | brief | block_onlinesurvey | - When I log in as "ethompson" - And I switch to "block_onlinesurvey_contentframe" iframe - Then I should see "4" - And I should not see "No open surveys available" - And I should see "Open surveys available" - And I click on "#block_onlinesurvey_area" "css_element" - And I wait "2" seconds - And I switch to the main frame - And "div.block_onlinesurvey_custom-modal_container" "css_element" should exist - And I switch to "block_onlinesurvey_custom-modal_contentframe" iframe - And I should see "My Survey Dashboard" - And I should see "Design Technology" - And I should see "Design Projects" - And I should see "Introduction to Programming for Architecture and Design" - And I switch to the main frame - And I click on ".block_onlinesurvey_custom-modal_close-button" "css_element" - And I wait "2" seconds - And "div.block_onlinesurvey_custom-modal_container" "css_element" should not exist - - Scenario: View block in detailed mode with a student who does not have any surveys in evasys - Given the following config values are set as admin: - | config | value | plugin | - | presentation | detailed | block_onlinesurvey | - When I log in as "student1" - And I switch to "block_onlinesurvey_contentframe" iframe - Then I should see "My Survey Dashboard" - And I should see "No online surveys found" - - Scenario: View block in detailed mode with a user who is a student in evasys - Given the following config values are set as admin: - | config | value | plugin | - | presentation | detailed | block_onlinesurvey | - When I log in as "tjohnson" - And I switch to "block_onlinesurvey_contentframe" iframe - Then I should see "My Survey Dashboard" - And I should not see "No online surveys found" - And I should see "Environmental Design" - And I should see "Design Projects" - - Scenario: View block in detailed mode with a user who is a teacher in evasys - Given the following config values are set as admin: - | config | value | plugin | - | presentation | detailed | block_onlinesurvey | - When I log in as "ethompson" - And I switch to "block_onlinesurvey_contentframe" iframe - Then I should see "My Survey Dashboard" - And I should not see "No online surveys found" - And I should see "Design Technology" - And I should see "Design Projects" - And I should see "Introduction to Programming for Architecture and Design" diff --git a/tests/behat/block_onlinesurvey_soap.feature.disabled b/tests/behat/block_onlinesurvey_soap.feature.disabled deleted file mode 100644 index 3de0dc1..0000000 --- a/tests/behat/block_onlinesurvey_soap.feature.disabled +++ /dev/null @@ -1,120 +0,0 @@ -@block @block_onlinesurvey @javascript @block_onlinesurvey_soap -Feature: Using the onlinesurvey block with the evasys SOAP API - In order to provide access to our evasys online surveys - As admin - I want to configure the block_onlinesurvey plugin to connect to evasys via SOAP and want to add the block to the Dashboard - -# This behat test feature file is fully working. -# But it needs a working evasys backend with surveys and users set up in a way as this test expects them as well. -# Because of that, the feature file is currently only shipped as disabled skeleton. - - Background: - Given the following config values are set as admin: - | config | value | plugin | - | presentation | brief | block_onlinesurvey | - | survey_hide_empty | 0 | block_onlinesurvey | - | offer_zoom | 1 | block_onlinesurvey | - | show_spinner | 0 | block_onlinesurvey | - | survey_show_popupinfo | 0 | block_onlinesurvey | - And the following config values are set as admin: - | config | value | plugin | - | connectiontype | SOAP | block_onlinesurvey | - | survey_server | https://[SERVERNAME]/evasys/services/soapserver-v61.wsdl | block_onlinesurvey | - | survey_login | https://[SERVERNAME]/evasys/ | block_onlinesurvey | - | survey_user | soap | block_onlinesurvey | - | survey_pwd | soap | block_onlinesurvey | - And the following config values are set as admin: - | config | value | - | defaulthomepage | 1 | - And the following "users" exist: - | username | email | - | student1 | student1@example.com | - | tjohnson | tjohnson@example.com | - | ethompson | ethompson@example.com | - And the following "courses" exist: - | fullname | shortname | category | - | Course 1 | C1 | 0 | - And the following "course enrolments" exist: - | user | course | role | - | student1 | C1 | student | - | tjohnson | C1 | student | - | ethompson | C1 | editingteacher | - And I log in as "admin" - And I am on site homepage - And I turn editing mode on - And I add the "Evaluations (evasys)" block - And I configure the "Evaluations (evasys)" block - And I set the following fields to these values: - | Page contexts | 2 | - And I press "Save changes" - And I turn editing mode off - And I follow "Dashboard" in the user menu - And I press "Customise this page" - And I configure the "Evaluations (evasys)" block - And I set the following fields to these values: - | Display on page types | Dashboard page | - And I press "Save changes" - And I log out - - Scenario: View block in compact mode with a student who does not have any surveys in evasys - Given the following config values are set as admin: - | config | value | plugin | - | presentation | brief | block_onlinesurvey | - When I log in as "student1" - And I switch to "block_onlinesurvey_contentframe" iframe - Then I should see "No open surveys available" - - Scenario: View block in compact mode with a user who is a student in evasys - Given the following config values are set as admin: - | config | value | plugin | - | presentation | brief | block_onlinesurvey | - When I log in as "tjohnson" - And I switch to "block_onlinesurvey_contentframe" iframe - Then I should see "2" - And I should not see "No open surveys available" - And I should see "Open surveys available" - And I click on "#block_onlinesurvey_area" "css_element" - And I wait "2" seconds - And I switch to the main frame - And "div.block_onlinesurvey_custom-modal_container" "css_element" should exist - And I switch to "block_onlinesurvey_custom-modal_contentframe" iframe - And I should see "Environmental Design" - And I should see "Design Projects" - And I switch to the main frame - And I click on ".block_onlinesurvey_custom-modal_close-button" "css_element" - And I wait "2" seconds - And "div.block_onlinesurvey_custom-modal_container" "css_element" should not exist - - Scenario: View block in compact mode with a user who is a teacher in evasys - Given the following config values are set as admin: - | config | value | plugin | - | presentation | brief | block_onlinesurvey | - When I log in as "ethompson" - And I switch to "block_onlinesurvey_contentframe" iframe - Then I should see "No open surveys available" - - Scenario: View block in detailed mode with a student who does not have any surveys in evasys - Given the following config values are set as admin: - | config | value | plugin | - | presentation | detailed | block_onlinesurvey | - When I log in as "student1" - And I switch to "block_onlinesurvey_contentframe" iframe - Then I should see "No open surveys available" - - Scenario: View block in detailed mode with a user who is a student in evasys - Given the following config values are set as admin: - | config | value | plugin | - | presentation | detailed | block_onlinesurvey | - When I log in as "tjohnson" - And I switch to "block_onlinesurvey_contentframe" iframe - Then I should not see "No open surveys available" - And I should see "Environmental Design" - And I should see "Design Projects" - - Scenario: View block in detailed mode with a user who is a teacher in evasys - Given the following config values are set as admin: - | config | value | plugin | - | presentation | detailed | block_onlinesurvey | - When I log in as "ethompson" - And I switch to "block_onlinesurvey_contentframe" iframe - Then I should see "No open surveys available"