Behat: Class and id locaters back in tests

Bug #1891569 reported by Rebecca Blundell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Confirmed
Medium
Unassigned

Bug Description

We made a decision some time ago that we would take class and id locators out of test steps and use a 'properties' file to abstract those instead: https://bugs.launchpad.net/mahara/+bug/1705622

I notice that locators are creeping back into the test steps.

I'm not sure why this is:
Do people not know about the properties file?
Is it clunky and hard to use?
Are test steps with locators preferred by devs/testers over the abstracted steps?

The 'properties' file was really the first iteration of the idea of creating a dictionary of human-readable-name mapping to a page locater (which could be a css element, xpath or other more background way of accessing the element).

The long-term goal was seen as a collection of locators for each page in Mahara that would allow a test to be written quickly, without the writer having to delve into the inspect window to find elements. If this is still seen as desirable, we need to continue to update and develop the 'properties' idea and to commit to adding to this instead of adding locators to the tests. This means that tests with locators should fail code review.

Do we need to abandon the properties idea, implement it in another way, or be more conscious of using the existing functionality?

Needs discussion.

Tags: behat-dev
description: updated
Changed in mahara:
status: New → Confirmed
importance: Undecided → Medium
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.