Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behat tests failing #30

Open
AdilIqbal95 opened this issue May 11, 2022 · 2 comments
Open

Behat tests failing #30

AdilIqbal95 opened this issue May 11, 2022 · 2 comments

Comments

@AdilIqbal95
Copy link

AdilIqbal95 commented May 11, 2022

Hi, the tests stated below are failing.

Environment details:
MySQL 5.7
PHP 7.4
Moodle latest MOODLE_400_STABLE

Error details:
file_resources.feature - Scenario: File resources are processed.

Then I should see the feedback place holder for the "1st" file resource: Xpath_element matching locator "//li[contains(concat(' ', @Class, ' '), ' modtype_resource ')][1]//[contains(concat(' ', @Class, ' '), ' ally-anchor-wrapper ')]//[contains(concat(' ', @Class, ' '), ' ally-feedback ')]" not found. (Behat\Mink\Exception\ElementNotFoundException)

filter.feature - Scenario: Course section html is annotated

And section 1 html is annotated: Css matching locator "#section-1 > .content > div[class*="summary"] > .no-overflow[data-ally-richcontent]" not found. (Behat\Mink\Exception\ElementNotFoundException)

forum_files.feature - Scenario: Forum attachments are processed appropriately.

And I add a new discussion to "Test forum name" Open Forum with:: The "(//html/.//a
[./@href][((./@id = 'Test forum name' or contains(normalize-space(string(.)), 'Test forum name') or contains(./@title, 'Test forum name') or contains(./@rel, 'Test forum name')) or .//[(contains(concat(' ', @Class, ' '), ' icon ') or self::img) and (contains(./@alt, 'Test forum name') or contains(./@title, 'Test forum name'))])] | //html/.//
[translate(./@ROLE, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = 'link'][((./@id = 'Test forum name' or contains(./@value, 'Test forum name')) or contains(./@title, 'Test forum name') or contains(normalize-space(string(.)), 'Test forum name'))])[1]" xpath node is not visible and it should be visible (Behat\Mink\Exception\ExpectationException)

glossary_files.feature - Scenario: Glossary attachments are processed appropriately

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

@dragos5436
Copy link

dragos5436 commented May 16, 2022

Additionally, these other tests from this plugin are also failing for MOODLE_400_STABLE:

  1. /var/www/html/filter/ally/tests/behat/lesson_annotation.feature:30
    Feature: In a lesson, rich content should have annotations
    Scenario: Lesson main page rich content is annotated
And I follow "Preview": Link matching locator "Preview" not found. (Behat\Mink\Exception\ElementNotFoundException)
  1. /var/www/html/filter/ally/tests/behat/module_annotation.feature:68
    /var/www/html/filter/ally/tests/behat/module_annotation.feature:69
    /var/www/html/filter/ally/tests/behat/module_annotation.feature:70
    Feature: When the ally filter is enabled ally annotations are inserted when appropriate into user generated label content
    Scenario: Module content is annotated and following HTML content URL for annotation works
And the lesson with html content "Some content" is not visible or not in viewport: Xpath matching locator "//li[contains(concat( " ", @class, " " ), " activity ") and contains(concat( " ", @class, " " ), " lesson ")]
//div[contains(concat( " ", @class, " " ), " no-overflow ")][@data-ally-richcontent]//*[contains(text(), "Some content")]
//ancestor::div[contains(concat( " ", @class, " " ), " no-overflow ")][position()=1]" not found. (Behat\Mink\Exception\ElementNotFoundException)
  1. /var/www/html/filter/ally/tests/behat/module_annotation.feature:73
    Feature: When the ally filter is enabled ally annotations are inserted when appropriate into user generated label content
    Scenario: Book chapters are annotated
And I open the book module: Xpath_element matching locator "        //div[@class="activityinstance"]//span[contains(text(), 'test book')]/../../a" not found. (Behat\Mink\Exception\ElementNotFoundException)

@leonstr
Copy link

leonstr commented Dec 5, 2024

Proposed fix in #75. This fix should fix the Behat tests but further fixes are required to get the tests to pass (details in PR).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants