Behat uploading a file step is currently broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Mahara |
High
|
Son Nguyen | ||
| 15.04 |
High
|
Unassigned | ||
| 15.10 |
High
|
Son Nguyen | ||
| 16.04 |
High
|
Unassigned | ||
| 16.10 |
High
|
Unassigned |
Bug Description
Hi Sonn,
There is an issue with the "Attaching a file" step.
Currently it passes and says it's a success but they file doesn't actually attach.
I have attached a test script below for you to test with.
Thanks,
Jinelle
Jinelle Foley-Barnes (jinelleb) wrote : | #1 |
Changed in mahara: | |
status: | New → Confirmed |
Son Nguyen (ngson2000) wrote : | #2 |
Patch for "master" branch: https:/
Son Nguyen (ngson2000) wrote : | #4 |
In order to attach files in behat tests, you need to
specify the full path to the upload file on the testing server, or
put the upload file into the folder test/behat/
I attached a working feature file which uses the "Image2.png" file already available in the upload_files folder.
Changed in mahara: | |
assignee: | nobody → Son Nguyen (ngson2000) |
status: | Confirmed → In Progress |
Jinelle Foley-Barnes (jinelleb) wrote : | #5 |
Hi Sonn,
Does this test that you've attached make a dialogue box appear?
I don't know what area in Mahara has a dialogue box so I can write a test for it myself.
If this isn't a test that I can use can you please flesh out a test for me and I can do the rest.
Cheers,
Jinelle
Son Nguyen (ngson2000) wrote : | #6 |
The confirmation dialogue box will be automatically accepted after each step. That's why you don't see the dialogue box when click delete button
The test file I attached does not make the box appear just include the new steps I implemented in https:/
There are many places in Mahara which have the alert or confirmation dialogue box when you try to delete something or navigate away without submit a change.
You can run the test I attached after checkout the patch https:/
I attach a new version of the test file as the previous one did not work
Changed in mahara: | |
milestone: | 15.04.0 → 15.04.1 |
Mahara Bot (dev-mahara) wrote : | #7 |
Patch for "master" branch: https:/
Robert Lyon (robertl-9) wrote : | #8 |
This actually works now - we can upload a file no problems.
I did notice we didn't actually test the deleting of a file though so have added a test for that
Mahara Bot (dev-mahara) wrote : | #9 |
Patch for "master" branch: https:/
Mahara Bot (dev-mahara) wrote : | #10 |
Patch for "master" branch: https:/
Reviewed: https:/
Committed: https:/
Submitter: Robert Lyon (<email address hidden>)
Branch: master
commit cff3fbffd7f9142
Author: Robert Lyon <email address hidden>
Date: Tue Mar 22 11:59:57 2016 +1300
Bug 1415247: Adding behat step to confirm file deletion
Change-Id: Iaee6116f622022
Signed-off-by: Robert Lyon <email address hidden>
Patch for "16.04_STABLE" branch: https:/
Mahara Bot (dev-mahara) wrote : | #13 |
Patch for "15.10_STABLE" branch: https:/
Mahara Bot (dev-mahara) wrote : | #14 |
Patch for "15.04_STABLE" branch: https:/
Reviewed: https:/
Committed: https:/
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.10_STABLE
commit 2793c01e85ff682
Author: Robert Lyon <email address hidden>
Date: Tue Mar 22 11:59:57 2016 +1300
Bug 1415247: Adding behat step to confirm file deletion
Change-Id: Iaee6116f622022
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit cff3fbffd7f9142
Mahara Bot (dev-mahara) wrote : | #16 |
Reviewed: https:/
Committed: https:/
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.04_STABLE
commit c5e652b707b7be3
Author: Robert Lyon <email address hidden>
Date: Tue Mar 22 11:59:57 2016 +1300
Bug 1415247: Adding behat step to confirm file deletion
Change-Id: Iaee6116f622022
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit cff3fbffd7f9142
Mahara Bot (dev-mahara) wrote : | #17 |
Reviewed: https:/
Committed: https:/
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.04_STABLE
commit 1e233c5e4970649
Author: Robert Lyon <email address hidden>
Date: Tue Mar 22 11:59:57 2016 +1300
Bug 1415247: Adding behat step to confirm file deletion
Change-Id: Iaee6116f622022
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit cff3fbffd7f9142
Changed in mahara: | |
status: | Fix Committed → Fix Released |
I have implemented 2 behat steps to deal with confirm popup