From 563070dfd47ba3b24c81dcdfe8e391ba7ec7dc5a Mon Sep 17 00:00:00 2001 From: royendo <67675319+royendo@users.noreply.github.com> Date: Fri, 13 Dec 2024 12:20:32 -0700 Subject: [PATCH] adding duplicate and refresh function to commonHelpers --- web-local/tests/utils/commonHelpers.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/web-local/tests/utils/commonHelpers.ts b/web-local/tests/utils/commonHelpers.ts index fa98cc945fe..108be699b2e 100644 --- a/web-local/tests/utils/commonHelpers.ts +++ b/web-local/tests/utils/commonHelpers.ts @@ -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"); + +} \ No newline at end of file