New Behat step: We need a step for dialogue boxes

Bug #1415252 reported by Jinelle Foley-Barnes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Invalid
High
Son Nguyen
15.04
Invalid
High
Unassigned
15.10
Invalid
High
Son Nguyen
16.04
Invalid
High
Unassigned

Bug Description

Hi,

We need to implement a step that can click on the dialogue boxes when they pop up.

I have attached a part of a test below, this should allow for a dialogue box to pop up so you can see it. I cant run it on my machine at the mo, but these are the steps that made the confirmation box to appear in 1.10.

Thanks,
Jinelle

Tags: behat
Revision history for this message
Jinelle Foley-Barnes (jinelleb) wrote :
Changed in mahara:
status: New → Confirmed
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/4369

Son Nguyen (ngson2000)
Changed in mahara:
assignee: nobody → Son Nguyen (ngson2000)
status: Confirmed → In Progress
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 15.04.0 → 15.04.1
Revision history for this message
Robert Lyon (robertl-9) wrote :

There is steps for dialog boxes - they are called:

     * @When /^I accept the alert popup$/
     * @When /^I accept the confirm popup$/
     * @When /^I cancel the confirm popup$/
     * @When /^I fill in "(?P<text>(?:[^"]|\\")*)" for popup$/

But they don't seem to be working at the moment

Revision history for this message
Jinelle Foley-Barnes (jinelleb) wrote :

That's a step closer :)

Thanks!!!

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

I found it was not as easy as having those steps mentioned in comment #3 as often what happens is one step triggers the popup, eg deleting something or navigating to another page so the behat fails out as it doesn't fully do that step before getting to a possible 'I accept the alert' step in behat scenario.

That's why for 'I delete the block' step I added the code to accept the popup as part of that function.

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

We by default cancel popup boxes

There are now also a number of places where we accept the popup via:

I delete the block :block
I delete the row :row

If we need more places to accept a popup box we will need to create a specific step for it or adjust those existing ones.

So will mark this as invalid as we can't have a generic accept/cancel popup being called after the step where we need to handle the popup

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.