Behat bug: Behat gets confused by the 2 different Groups in navigation

Bug #1425392 reported by Jinelle Foley-Barnes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Won't Fix
Low
Son Nguyen
15.04
Won't Fix
Low
Unassigned
15.10
Won't Fix
Low
Son Nguyen
16.04
Won't Fix
Low
Unassigned
16.10
Won't Fix
Low
Unassigned

Bug Description

Hi,

I have a attached a broken Behat test. When it clicks on the first "Groups" heading in the navigation it works fine.
eg "Find friends" in "Groups"

Then it fails when it tries selecting "Archived submissions" in "Groups" .

It doesn’t like the fact that there are 2 of them. What way do we have to work around this?

Thanks,
Jinelle

Tags: behat
Revision history for this message
Jinelle Foley-Barnes (jinelleb) wrote :
Revision history for this message
Son Nguyen (ngson2000) wrote :

The problem is the xpath of menu "Groups" is not consistent to other menu.

For example, the xpath of
- "Users" is //div[@id='main-nav']/ul[@id="nav"]/li/span/a[.="Users"]
- "Institutions" is //div[@id='main-nav']/ul[@id="nav"]/li/span/a[.="Institutions"]

while "Groups" is //div[@id='main-nav']/ul[@id="nav"]/li//span/a/span[.="Groups"]

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/4326

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

The 'Groups' menu item in the admin section has an accessible hidden value "(Administer groups)" as well
so

 Find "Archived submissions" in "Groups"

will fail but

 Find "Archived submissions" in "Groups (Administer groups)" will pass without needing patch 4326

So do we want to make it clearer in our behat tests that we are talking about "Groups" in admin vs "Groups" in normal area by using "Groups (Administer groups)" or not?

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

Yes, it is clearer to use accessible hidden values to identify the menu item.
However, it would require testers to find out the hidden value.

I will also fix the navigation steps to deal only with the visible text which is seen by testers

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

Will drop down the importance as there is a current work around to use the hidden accessibility test

Changed in mahara:
importance: High → Medium
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 15.04.0 → 15.04.1
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 16.10.1 → 17.04.0
status: Confirmed → In Progress
Revision history for this message
Robert Lyon (robertl-9) wrote :

Will leave the workaround as the preferred fix for this and so will close the bug

Changed in mahara:
importance: Medium → Low
status: In Progress → Won't Fix
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 17.04.0 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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