-
Notifications
You must be signed in to change notification settings - Fork 182
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
Questionnaire different ≤ 4.2 and ≥ 4.3 activity completion behat tests … #523
Questionnaire different ≤ 4.2 and ≥ 4.3 activity completion behat tests … #523
Conversation
Just tested this PR on my local Moodle site running Moodle 4.3. PR Works as expected, the first scenario (Check questionnaire completion feature in web for Moodle ≤ 4.2) is skipped and the "Check questionnaire completion feature in web for Moodle ≥ 4.3" scenario is passed OK. |
@lucaboesch thanks for this. Do you know why we need to add "xpath" for 4.3? This seems to be something that would not be desirable. |
And I click on "3" radio wouldn't execute any more, @mchurchward, I tried it... |
But it does work in other places, like:
That makes me think there is something wrong with the display of that radio. There may need to be a fix in the display code. |
Also, the error that was highlighted here was for "Completion tracking". So the radio error came up after that was fixed? |
@lucaboesch I just tested this locally, and the only change it needs is for the "Completion tracking". The radio buttons work fine. |
It would be of great help if you could paste in the modified lines here, @mchurchward |
6bd800d
to
37804f2
Compare
I had it run again.
|
| Max. text length | 15 | | ||
| Question Text | Enter some text | | ||
Then I should see "[Text Box] (Q8)" | ||
And I am on the "Test questionnaire completion" "questionnaire activity editing" page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the lines below can be simplified to:
And I expand all fieldsets
And I set the following fields to these values:
| Add requirements | 1 |
| Student must submit this questionnaire to complete it | 1 |
This is from examples in core.
Then I should see "Are you still in School?" | ||
And I should see "Select one choice" | ||
And I should see "Enter some text" | ||
And I set the field with xpath "//input[@type='radio' and @id='auto-rb0001']" to "1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code:
And I click on "Yes" "radio"
And I click on "Three" "radio"
still works for me running Behat locally. I don't think this and the next change are needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if its due to "master". The CI should be changed to MOODLE_403_STABLE now that it has been released.
I wonder if that is a Chrome issue with Behat? Maybe try changing the CI behat line: |
72e745b
to
20e0d2d
Compare
@lucaboesch I figured out the problem. Radio buttons should not use "I click". They need a "Set field to" instead. But, they do work if "@javascript" is specified, and it wasn't for the new 4.3 scenario. In any case, the correct fix is to use "set field to". |
db646a1
to
bf709ec
Compare
bf709ec
to
40037f0
Compare
Yeah, @mchurchward, but the point was to make the test passing for Moodle ≥ 4.3 as well as Moodle ≤ 4.2 so you don't resolve in leaving out those versions in ci.yml. Best, |
Thanks Luca. Of course once we add PHP8.2 to the CI, there will be a huge mess. :-0 |
… fix #522 .
Dear @mchurchward this pull request lets pass the automated tests again.
Best,
Luca