Skip to content

Commit

Permalink
adding duplicate and refresh function to commonHelpers
Browse files Browse the repository at this point in the history
  • Loading branch information
royendo committed Dec 13, 2024
1 parent eabe291 commit 563070d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions web-local/tests/utils/commonHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,24 @@ export async function updateCodeEditor(page: Page, code: string) {
await page.keyboard.insertText(code);
await page.waitForTimeout(500);
}


export async function duplicateFileUsingMenu(
page: Page,
filePath: string
) {
// open context menu and click rename
await openFileNavEntryContextMenu(page, filePath);
await clickMenuButton(page, "Duplicate");

}

export async function refreshFileUsingMenu(
page: Page,
filePath: string
) {
// open context menu and click rename
await openFileNavEntryContextMenu(page, filePath);
await clickMenuButton(page, "Refresh source");

}

0 comments on commit 563070d

Please sign in to comment.