Skip to content

Commit

Permalink
use universal ctrl-meta modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
ScharfViktor committed Jun 12, 2024
1 parent 7cf40fe commit 70a896a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"@ownclouders/eslint-config": "workspace:*",
"@ownclouders/prettier-config": "workspace:*",
"@ownclouders/tsconfig": "workspace:*",
"@playwright/test": "1.39.0",
"@playwright/test": "1.44.1",
"@rollup/plugin-inject": "5.0.3",
"@types/glob": "8.1.0",
"@types/lodash-es": "4.17.7",
Expand Down
42 changes: 21 additions & 21 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions tests/e2e/support/objects/app-files/resource/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,13 +409,13 @@ export const fillContentOfDocument = async ({
break
case 'Collabora':
await editorMainFrame.locator(collaboraDocTextAreaSelector).focus()
await page.keyboard.press('Control+A')
await page.keyboard.press('ControlOrMeta+A')
await editorMainFrame.locator(collaboraDocTextAreaSelector).fill(text)
break
case 'OnlyOffice':
const innerIframe = editorMainFrame.frameLocator(onlyOfficeInnerFrameSelector)
await innerIframe.locator(onlyofficeDocTextAreaSelector).focus()
await page.keyboard.press('Control+A')
await page.keyboard.press('ControlOrMeta+A')
await innerIframe.locator(onlyofficeDocTextAreaSelector).fill(text)
break
default:
Expand Down Expand Up @@ -455,8 +455,8 @@ export const openAndGetContentOfDocument = async ({
)
}
// copying and getting the value with keyboard requires some
await page.keyboard.press('Control+A', { delay: 200 })
await page.keyboard.press('Control+C', { delay: 200 })
await page.keyboard.press('ControlOrMeta+A', { delay: 200 })
await page.keyboard.press('ControlOrMeta+C', { delay: 200 })
return await page.evaluate(() => navigator.clipboard.readText())
}

Expand Down Expand Up @@ -898,15 +898,15 @@ export const moveOrCopyMultipleResources = async (
}
case 'keyboard': {
const keyValue = action === 'copy' ? 'c' : 'x'
await page.keyboard.press(`Control+${keyValue}`)
await page.keyboard.press(`ControlOrMeta+${keyValue}`)
await page.locator(breadcrumbRoot).click()
const newLocationPath = newLocation.split('/')
for (const path of newLocationPath) {
if (path !== 'Personal') {
await clickResource({ page, path: path })
}
}
await page.keyboard.press('Control+v')
await page.keyboard.press('ControlOrMeta+v')
break
}
case 'drag-drop': {
Expand Down Expand Up @@ -970,7 +970,7 @@ export const moveOrCopyResource = async (args: moveOrCopyResourceArgs): Promise<
const resourceCheckbox = page.locator(util.format(checkBox, resourceBase))
await resourceCheckbox.check()
const keyValue = action === 'copy' ? 'c' : 'x'
await page.keyboard.press(`Control+${keyValue}`)
await page.keyboard.press(`ControlOrMeta+${keyValue}`)
await page.locator(breadcrumbRoot).click()
const newLocationPath = newLocation.split('/')
for (const path of newLocationPath) {
Expand All @@ -985,7 +985,7 @@ export const moveOrCopyResource = async (args: moveOrCopyResourceArgs): Promise<
resp.status() === 201 &&
resp.request().method() === action.toUpperCase()
),
page.keyboard.press('Control+v')
page.keyboard.press('ControlOrMeta+v')
])
break
}
Expand Down

0 comments on commit 70a896a

Please sign in to comment.