This repository has been archived by the owner on May 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[terra-functional-testing] Wdio7 Upgrade (#674)
* Upgrade wdio 7 * Update all wdio dependencies * update constructor * writeStream * work around * upgrade guide * Update packages/terra-toolkit-docs/src/terra-dev-site/tool/terra-functional-testing/upgrade-guides.5/version-2-upgrade-guide.2.tool.md Co-authored-by: Ben Cai <[email protected]> * Fix merged jest tests. Code review comments * node version * Revert "[terra-functional-testing] Set test page to the viewport size instead of the browser's window size (#673)" This reverts commit 4ada1f5. * Update large test viewport * More doc updates * Update packages/terra-functional-testing/src/services/wdio-visual-regression-service/modules/getTerraFormFactor.js Co-authored-by: Matt Henkes <[email protected]> * Update CHANGELOG.md changelog oops * lint * Fix test Co-authored-by: Ben Cai <[email protected]> Co-authored-by: Matt Henkes <[email protected]>
- Loading branch information
1 parent
713ecb8
commit 0662f92
Showing
43 changed files
with
133 additions
and
163 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
20 changes: 0 additions & 20 deletions
20
packages/terra-functional-testing/src/commands/utils/getViewportSize.js
This file was deleted.
Oops, something went wrong.
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
25 changes: 0 additions & 25 deletions
25
packages/terra-functional-testing/src/commands/utils/setViewportSize.js
This file was deleted.
Oops, something went wrong.
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
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
13 changes: 12 additions & 1 deletion
13
...ctional-testing/src/services/wdio-visual-regression-service/modules/getTerraFormFactor.js
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
16 changes: 0 additions & 16 deletions
16
packages/terra-functional-testing/tests/jest/commands/utils/getViewportSize.test.js
This file was deleted.
Oops, something went wrong.
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
14 changes: 9 additions & 5 deletions
14
packages/terra-functional-testing/tests/jest/commands/utils/setViewport.test.js
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 |
---|---|---|
@@ -1,20 +1,24 @@ | ||
const { setViewport, setViewportSize } = require('../../../../src/commands/utils'); | ||
const { setViewport } = require('../../../../src/commands/utils'); | ||
const { TERRA_VIEWPORTS } = require('../../../../src/constants'); | ||
|
||
jest.mock('../../../../src/commands/utils/setViewportSize'); | ||
const mockSetWindowSize = jest.fn(); | ||
|
||
global.browser = { | ||
setWindowSize: mockSetWindowSize, | ||
}; | ||
|
||
describe('setViewport', () => { | ||
it('should set specified viewport', () => { | ||
const tinyViewport = TERRA_VIEWPORTS.tiny; | ||
const { width, height } = TERRA_VIEWPORTS.tiny; | ||
|
||
setViewport('tiny'); | ||
|
||
expect(setViewportSize).toHaveBeenCalledWith(tinyViewport); | ||
expect(global.browser.setWindowSize).toHaveBeenCalledWith(width, height); | ||
}); | ||
|
||
it('should not set the window size for unsupported viewport', () => { | ||
setViewport('unsupported-viewport'); | ||
|
||
expect(setViewportSize).not.toHaveBeenCalled(); | ||
expect(global.browser.setWindowSize).not.toHaveBeenCalled(); | ||
}); | ||
}); |
27 changes: 0 additions & 27 deletions
27
packages/terra-functional-testing/tests/jest/commands/utils/setViewportSize.test.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.