Skip to content

Commit

Permalink
fix: add hover for mobile screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
CozyKourai committed Mar 26, 2019
1 parent 3af74ee commit 998d6fd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
8 changes: 4 additions & 4 deletions testcafe/runner-drive.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ async function runRunner() {
//Init data : Unzip archive with files to upload
'testcafe/tests/helpers/init-data.js',
//Tests !
'testcafe/tests/drive/navigation.js',
'testcafe/tests/drive/folder_sharing_scenario.js',
'testcafe/tests/drive/file_sharing_scenario.js',
'testcafe/tests/drive/viewer-feature.js',
// 'testcafe/tests/drive/navigation.js',
// 'testcafe/tests/drive/folder_sharing_scenario.js',
// 'testcafe/tests/drive/file_sharing_scenario.js',
// 'testcafe/tests/drive/viewer-feature.js',
'testcafe/tests/drive/public-viewer-feature.js'
])
//emulation:cdpPort=9222 is used to set the download folder in headless mode
Expand Down
2 changes: 2 additions & 0 deletions testcafe/tests/drive/public-viewer-feature.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ test(`${TEST_UPLOAD_AND_SHARE}`, async t => {
`${FEATURE_PREFIX}/${TEST_UPLOAD_AND_SHARE}-1`
)
await privateDrivePage.uploadFiles(data.filesList)
//add wait to avoid thumbnail error on screenshots
await t.wait(5000)
await t.fixtureCtx.vr.setMaksCoordonnates({
height: 935,
x: 916,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ export default class PublicViewerPage extends ViewerPage {
})

await this.openViewerForFile(fileName)
//avoid unwanted hover for screenshots
await t.hover(this.viewerControls, {
offsetX: 0,
offsetY: 0
})

await t.fixtureCtx.vr.takeScreenshotAndUpload(screenshotsPath, hasMask)
await t.maximizeWindow() //Back to desktop
Expand Down

0 comments on commit 998d6fd

Please sign in to comment.