-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: add debug hover page object module (#1249)
- Loading branch information
1 parent
4c98981
commit 2c49b7f
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
export const create = ({ expect, page, VError }) => { | ||
return { | ||
async expandProperty(name) { | ||
try { | ||
const property = page.locator(`.debug-property[aria-label="${name}"]`) | ||
await expect(property).toBeVisible() | ||
await property.click() | ||
} catch (error) { | ||
throw new VError(error, `Failed to expand debug hover property`) | ||
} | ||
}, | ||
async collapseProperty(name) { | ||
try { | ||
const property = page.locator(`.debug-property[aria-label="${name}"]`) | ||
await expect(property).toBeVisible() | ||
await property.click() | ||
await expect(property).toBeHidden() | ||
} catch (error) { | ||
throw new VError(error, `Failed to collapse debug hover property`) | ||
} | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters