Issue targeting a select2 tag in behat test

Bug #1733995 reported by Rebecca Blundell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Rebecca Blundell

Bug Description

When sharing a page with another user, it is not possible to target the drop-down box with 'Search' placeholder text using css id. Is this an issue with the way select2 search works in Behat? Or something else?

Tags: behat
Revision history for this message
Rebecca Blundell (rjb-dev) wrote :
Changed in mahara:
status: New → In Progress
assignee: nobody → Rebecca Blundell (rjb-dev)
Changed in mahara:
importance: Undecided → Medium
milestone: none → 18.04.0
Revision history for this message
Robert Lyon (robertl-9) wrote :

We have a couple of ways of accessing select2 in behat

And I set the select2 value "Collection UserA_05" for "editaccess_collections"
- used when the select2 is pre-populated with data

And I fill in select2 input "sendmessage_recipients" with "UserA" and select "Angela User (UserA)"
- used when the select2 needs to fetch data via ajax

In the case of the access list page we should be able to target the select id, eg: accesslist[0][id]

Changed in mahara:
status: In Progress → Incomplete
milestone: 18.04.0 → none
Revision history for this message
Rebecca Blundell (rjb-dev) wrote :

It's not just a problem for the hidden select2 box that pops up if you choose an option from Search for..., but also to choose Friends from the General section (see attached screenshot). As it's the second instance of the word Friends in the list it doesn't work. I've got a patch for this that I will test for the other instance as well.

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

Changed in mahara:
status: Incomplete → In Progress
milestone: none → 18.10.0
Revision history for this message
Mahara Bot (dev-mahara) wrote :

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

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

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

commit 92cd96d33da0fa21e8f28cc1de08ed2a8789c8cf
Author: Rebecca Blundell <email address hidden>
Date: Wed May 23 17:25:09 2018 +1200

Bug 1733995: fix for targetting hidden select2 search box

Change-Id: I62bf8065c82fba34f9eea1a3e3e004523b19abee

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
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.