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.
Revert "[terra-functional-testing] Set test page to the viewport size…
- Loading branch information
Jaime Mackey
committed
Jun 21, 2021
1 parent
1acf1f9
commit 65d8a05
Showing
11 changed files
with
35 additions
and
110 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
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.
23 changes: 22 additions & 1 deletion
23
...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.