Skip to content

Commit

Permalink
feature: add debug hover page object module (#1249)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSiefke authored Aug 11, 2024
1 parent 4c98981 commit 2c49b7f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
23 changes: 23 additions & 0 deletions packages/page-object/src/parts/DebugHover/DebugHover.js
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`)
}
},
}
}
1 change: 1 addition & 0 deletions packages/page-object/src/parts/Parts/Parts.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export * as ActivityBar from '../ActivityBar/ActivityBar.js'
export * as Colors from '../Colors/Colors.js'
export * as ContextMenu from '../ContextMenu/ContextMenu.js'
export * as DebugConsole from '../DebugConsole/DebugConsole.js'
export * as DebugHover from '../DebugHover/DebugHover.js'
export * as DiffEditor from '../DiffEditor/DiffEditor.js'
export * as DropDownContextMenu from '../DropDownContextMenu/DropDownContextMenu.js'
export * as Editor from '../Editor/Editor.js'
Expand Down

0 comments on commit 2c49b7f

Please sign in to comment.