Behat uploading a file step is currently broken

Bug #1415247 reported by Jinelle Foley-Barnes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Son Nguyen
15.04
Fix Released
High
Unassigned
15.10
Fix Released
High
Son Nguyen
16.04
Fix Released
High
Unassigned
16.10
Fix Released
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

Revision history for this message
Jinelle Foley-Barnes (jinelleb) wrote :
Changed in mahara:
status: New → Confirmed
Revision history for this message
Son Nguyen (ngson2000) wrote :

I have implemented 2 behat steps to deal with confirm popup

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/4580

Revision history for this message
Son Nguyen (ngson2000) wrote :

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/upload_files and use only the relative path to the file in the behat feature.

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
Revision history for this message
Jinelle Foley-Barnes (jinelleb) wrote :

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

Revision history for this message
Son Nguyen (ngson2000) wrote :

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://reviews.mahara.org/#/c/4580.

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://reviews.mahara.org/#/c/4580.

I attach a new version of the test file as the previous one did not work

Robert Lyon (robertl-9)
Changed in mahara:
milestone: 15.04.0 → 15.04.1
Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "master" branch: https://reviews.mahara.org/6217

Revision history for this message
Robert Lyon (robertl-9) wrote :

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

https://reviews.mahara.org/6217

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "master" branch: https://reviews.mahara.org/6302

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "master" branch: https://reviews.mahara.org/6301

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/6217
Committed: https://git.mahara.org/mahara/mahara/commit/cff3fbffd7f9142dc5d7be52d6fc033dd82b86d2
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit cff3fbffd7f9142dc5d7be52d6fc033dd82b86d2
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: Iaee6116f6220227325d5ead4ec548a8f8df26797
Signed-off-by: Robert Lyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "16.04_STABLE" branch: https://reviews.mahara.org/6450

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "15.10_STABLE" branch: https://reviews.mahara.org/6451

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "15.04_STABLE" branch: https://reviews.mahara.org/6452

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/6451
Committed: https://git.mahara.org/mahara/mahara/commit/2793c01e85ff682389108bc186b9737a3c87467a
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.10_STABLE

commit 2793c01e85ff682389108bc186b9737a3c87467a
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: Iaee6116f6220227325d5ead4ec548a8f8df26797
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit cff3fbffd7f9142dc5d7be52d6fc033dd82b86d2)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/6450
Committed: https://git.mahara.org/mahara/mahara/commit/c5e652b707b7be375eb5ffe74f3eb7634892f362
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.04_STABLE

commit c5e652b707b7be375eb5ffe74f3eb7634892f362
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: Iaee6116f6220227325d5ead4ec548a8f8df26797
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit cff3fbffd7f9142dc5d7be52d6fc033dd82b86d2)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/6452
Committed: https://git.mahara.org/mahara/mahara/commit/1e233c5e4970649433be8d8e6e12ca3d9d47a8b4
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.04_STABLE

commit 1e233c5e4970649433be8d8e6e12ca3d9d47a8b4
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: Iaee6116f6220227325d5ead4ec548a8f8df26797
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit cff3fbffd7f9142dc5d7be52d6fc033dd82b86d2)

Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.