moodlehq / moodle-availability_mobileapp

Control module and section access for Moodle Mobile app
GNU General Public License v3.0
1 stars 9 forks source link

Behat failing #1

Open ewallah opened 7 years ago

ewallah commented 7 years ago

001 Scenario: Test condition

availability/condition/mobileapp/tests/behat/availability_mobileapp.feature:29

  And I set the following administration settings values:

availability/condition/mobileapp/tests/behat/availability_mobileapp.feature:20

   Xpath matching locator "//*[label[contains(., 'Enable conditional access')]|span[contains(., 'Enable conditional access')]]/ancestor::div[contains(concat(' ', normalize-space(@class), ' '), ' form-item ')]/descendant::div[contains(concat(' ', @class, ' '), ' form-group ')]/descendant::*[self::input | self::textarea | self::select][not(./@type = 'submit' or ./@type = 'image' or ./@type = 'hidden')]" not found. (Behat\Mink\Exception\ElementNotFoundException)

Moodle 3.2.2+ (Build: 20170324) Php: 7.1.3.2.1, mysqli: 5.7.17-0ubuntu0.16.04.1, OS: Linux 4.4.0-67-generic x86_64 Server OS "Linux", Browser: "firefox"

availability_mobileapp_i-set-the-following-administration-settings-values-_20

ewallah commented 7 years ago

Got the behat testing working in Moodle 3.2 with this background:

Background: Given the following "courses" exist: | fullname | shortname | format | enablecompletion | | Course 1 | C1 | topics | 1 | And the following "users" exist: | username | | teacher1 | | student1 | And the following "course enrolments" exist: | user | course | role | | teacher1 | C1 | editingteacher | | student1 | C1 | student | And the following config values are set as admin: | enableavailability | 1 | | enablewebservices | 1 | | enablemobilewebservice | 1 | And I log in as "admin" And I navigate to "Mobile settings" node in "Site administration > Mobile app" And I click on "Enable web services for mobile devices" "checkbox" And I click on "Save changes" "button" And I log out

jleyva commented 7 years ago

Hi, thanks for the fix, would you like to create a pull request to integrate a commit keeping your authorship?

ewallah commented 7 years ago

Hi,

Since my report on March 26, we also have MDL-56614. So I implemented some other changes. Give me some time to create a pull request..

R