Closed Bug 1025506 Opened 10 years ago Closed 10 years ago

Homescreen tests should not rely on dom order

Categories

(Firefox OS Graveyard :: Gaia::UI Tests, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: kgrandon, Unassigned)

Details

In bug 1022713 we noticed that gaia ui tests for homescreen currently rely on DOM order. As we are going to position elements with a combination of absolute and transform properties, we can not do this.

We should update the test to not rely on dom order, I might recommend using document.getElementFromPoint() or similar.
Blocks: 1019891
Zac - will you be looking into this one? We have just disabled this test so we can iterate quickly on the homescreen code, and it was a little too brittle.

We do have coverage for this in gaia unit tests, and are in the works of creating a JS marionette test for drag drop functionality. I think we will be leveraging either hard-coded or calculated pixel positions, and using something like Document.elementFromPoint() so we do not relay on dom ordering. Let me know if you would like to collaborate on something.
Flags: needinfo?(zcampbell)
No longer blocks: 1022713
I feel that Cwiiis's patch in bug 1022713 will resolve this (commit here: https://github.com/Cwiiis/gaia/commit/a9a16385934a2d741eea91fa4200905d1d4d9a81 ) as it just uses some code that we've already put in place to combat the problem.

I don't think elementFromPoint will be beneficial because finding the point will rely on Marionette and Marionette relies on the DOM order. It's easier just to get the HTMLElement straight from the grid object as we are now (and in the commit linked above).

At the moment there's no real risk, the one test that uses this feature is functional and a valid test case, but long term resolving this bug is a good practice.
Flags: needinfo?(zcampbell)
Whiteboard: [xfail]
This is not xfail - the devs regressed the testability of the app in another patch and this one was blamed.

This is just an enhancement.
Whiteboard: [xfail]
This is not blocking the migration because this test was already live.
No longer blocks: 1019891
You've filed bug 1027144, I don't think we need both. Marking this as invalid as it's pretty to not rely on dom order, and the current problem is waiting for transitionend.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
I was happy to take this as test enhancement (which we should do) but it's not the test bug here so OK!
You need to log in before you can comment on or make changes to this bug.