Behat failing tests when trying to add blocks on pages
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Medium
|
Cecilia Vela Gurovic |
Bug Description
There are a few behat tests that fail, so far I've seen
edit_default_
group_view_
shared_
They try to add a block but the modal is never opened and then the tests fails trying to select a blocktype from a modal that is not visible.
By looking into the Network tab of the browser while running the tests, I could see that there are too many calls to view/blocks.
The calls have parameters like
id: 2
change: 1
action_
so they're just trying to resize or move the blocks inside the page.
Changed in mahara: | |
milestone: | none → 20.10.0 |
Changed in mahara: | |
importance: | Undecided → Low |
status: | New → Confirmed |
summary: |
- Behat fainling tests when trying to add blocks on pages + Behat failing tests when trying to add blocks on pages |
Changed in mahara: | |
importance: | Low → Medium |
description: | updated |
Changed in mahara: | |
status: | Confirmed → In Progress |
assignee: | nobody → Cecilia Vela Gurovic (ceciliavg) |
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
I think the issue may also be due to the adding of a block to a page includes some ajax/js which may finish executing after behat goes into it's next step.
So this is happening in behat:
1) adds placeholder block to page
2) selects what type of bock it will be
- on click kicks off ajax to fetch the config for the block
3) next behat step updates form fields including title
- the ajax finally finishes and part of that is to update the block title to the title that existed in step 1, which is 'Placeholder'
4) the block config is saved - but with the old and not the new title
I believe we need to make sure step 2 has fully finished before doing step three