-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Canvas] Add simple visual test for fullscreen (#51234)
* Add simple visual test for fullscreen workpads in Canvas * Adding canvas to the config * Adding sample data visual tests * Refactor to use new helper method * Reverting sample data visual test for now * Forgot to add the awaits
- Loading branch information
1 parent
7a62946
commit 94b2eb4
Showing
4 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
export default function ({ getPageObjects, getService }) { | ||
const PageObjects = getPageObjects(['common', 'canvas']); | ||
const visualTesting = getService('visualTesting'); | ||
|
||
describe('fullscreen', () => { | ||
it('workpad should display properly in fullscreen mode', async () => { | ||
await PageObjects.common.navigateToApp('canvas', { | ||
hash: '/workpad/workpad-1705f884-6224-47de-ba49-ca224fe6ec31/page/1' | ||
}); | ||
|
||
await PageObjects.canvas.enterFullscreen(); | ||
|
||
await PageObjects.canvas.waitForWorkpadElements(); | ||
|
||
await visualTesting.snapshot(); | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
import { DEFAULT_OPTIONS } from '../../../../../test/visual_regression/services/visual_testing/visual_testing'; | ||
|
||
const [SCREEN_WIDTH] = DEFAULT_OPTIONS.widths || []; | ||
|
||
export default function ({ loadTestFile, getService }) { | ||
const esArchiver = getService('esArchiver'); | ||
const browser = getService('browser'); | ||
|
||
describe('canvas app visual regression', function () { | ||
before(async () => { | ||
await esArchiver.loadIfNeeded('logstash_functional'); | ||
await esArchiver.load('canvas/default'); | ||
|
||
await browser.setWindowSize(SCREEN_WIDTH, 1000); | ||
}); | ||
|
||
after(async () => { | ||
await esArchiver.unload('canvas/default'); | ||
}); | ||
|
||
this.tags('ciGroup10'); | ||
loadTestFile(require.resolve('./fullscreen')); | ||
}); | ||
} |