moodleou / moodle-report_customsql

A Moodle report plugin that lets you easily create simple reports that can be expressed as a single SQL query
48 stars 100 forks source link

Behat test failing - report_customsql.feature #112

Open AdilIqbal95 opened 2 years ago

AdilIqbal95 commented 2 years ago

Hi, the test stated above is failing.

Environment details: MySQL 5.7 PHP 7.4 Moodle latest MOODLE_311_STABLE

Error details: Scenario: Edit an Ad-hoc database query And I follow "Edit query 'Test query'": The "(//html/.//a [./@href][((./@id = "Edit query 'Test query'" or contains(normalize-space(string(.)), "Edit query 'Test query'") or contains(./@title, "Edit query 'Test query'") or contains(./@rel, "Edit query 'Test query'")) or .//[(contains(concat(' ', @class, ' '), ' icon ') or self::img) and (contains(./@alt, "Edit query 'Test query'") or contains(./@title, "Edit query 'Test query'"))])] | //html/.// [translate(./@role, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = 'link'][((./@id = "Edit query 'Test query'" or contains(./@value, "Edit query 'Test query'")) or contains(./@title, "Edit query 'Test query'") or contains(normalize-space(string(.)), "Edit query 'Test query'"))])[1]" xpath node is not visible and it should be visible (Behat\Mink\Exception\ExpectationException)

Scenario: Delete an Ad-hoc database query And I follow "Delete query 'Test query'": The "(//html/.//a [./@href][((./@id = "Delete query 'Test query'" or contains(normalize-space(string(.)), "Delete query 'Test query'") or contains(./@title, "Delete query 'Test query'") or contains(./@rel, "Delete query 'Test query'")) or .//[(contains(concat(' ', @class, ' '), ' icon ') or self::img) and (contains(./@alt, "Delete query 'Test query'") or contains(./@title, "Delete query 'Test query'"))])] | //html/.// [translate(./@role, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = 'link'][((./@id = "Delete query 'Test query'" or contains(./@value, "Delete query 'Test query'")) or contains(./@title, "Delete query 'Test query'") or contains(normalize-space(string(.)), "Delete query 'Test query'"))])[1]" xpath node is not visible and it should be visible (Behat\Mink\Exception\ExpectationException)

timhunt commented 2 years ago

The test pass for us: https://github.com/moodleou/moodle-report_customsql/actions/runs/2005172987. I don't know why they would be failing for you.

dragos5436 commented 2 years ago

These tests are also failing in Moodle 4.0. Additionally, this other test from this plugin is also failing for MOODLE_400_STABLE:

/var/www/html/report/customsql/tests/behat/report_customsql.feature:89 Feature: Ad-hoc database queries report Scenario: Create an Ad-hoc database query in a custom category

And I follow "Ad-hoc database queries": Link matching locator "Ad-hoc database queries" not found. (Behat\Mink\Exception\ElementNotFoundException)

MySQL 5.7 PHP 7.4 Moodle latest MOODLE_400_STABLE executed with moodlehq/moodle-docker