Closed Bug 1663888 Opened 4 years ago Closed 4 years ago

Add Node Picker test helpers

Categories

(DevTools :: Inspector, task, P3)

task

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1650812

People

(Reporter: rcaliman, Unassigned)

References

(Blocks 1 open bug)

Details

Follow-up from https://phabricator.services.mozilla.com/D81528#inline-469647

Introduce a wrapper for node picker helpers in mochitests.

Something like:

getNodePickerHelpers(inspector, testActor){
// inspector and testActor will be scoped to this function
// all returned methods will have access to them without requiring them as explicit arguments
 return {
  startPicker(),
  cancelPicker(),
  hoverElement(selector, x, y)
 }
}

In context in a test we'd do:

const { startPicker, hoverElement } = getNodePickerHelpers(inspector, testActor);

....

await startPicker();
await hoverElement("div", 1, 1);
Severity: -- → N/A
Priority: -- → P3
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.