-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Playwright: use an interface for passing TestFile paths. (#55693)
* Define and implement interface for TestFile. - update Media (Upload) spec. - update CoBlocks spec. - update Blocks Media (Upload) spec. * Correct comments referencing old way of obtaining file names. Move Media Upload spec to TypeScript. Update Media (Edit) spec * Refactor how source test file paths are handled. - new file `constants.js` to hold the source paths for the test files. - call `createTestFile` by default and provide path. - refactor the createTestFile method to use better variable names. Revise behavior when hook fails. Revise environment behavior again. - set the `hookFailed` attribute to true if hook failure is experienced. - add clause at `test_start` event to check for hook failure, and if detected, mark rest of the test cases as failed. Rebase.
- Loading branch information
1 parent
1faca9b
commit 091f787
Showing
9 changed files
with
134 additions
and
94 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
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,11 @@ | ||
import path from 'path'; | ||
|
||
export const TEST_IMAGE_PATH = path.normalize( | ||
path.join( __dirname, '..', 'image-uploads', 'image0.jpg' ) | ||
); | ||
export const TEST_AUDIO_PATH = path.normalize( | ||
path.join( __dirname, '..', 'image-uploads', 'bees.mp3' ) | ||
); | ||
export const UNSUPPORTED_FILE_PATH = path.normalize( | ||
path.join( __dirname, '..', 'image-uploads', 'unsupported_extension.mkv' ) | ||
); |
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
Oops, something went wrong.