-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cypress skips test cases instead of removing test cases for all
- Loading branch information
Showing
2 changed files
with
28 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,25 @@ | ||
import { testCases } from './../../test-cases'; | ||
|
||
// TODO: Remove when Cypress support achieves parity with Playwright | ||
const skippedTestCases = [ | ||
'asset doesnt prevent directory from being created', | ||
'percents in URLs are handled', | ||
]; | ||
|
||
describe('assets', () => { | ||
// add more tests | ||
testCases.forEach(({ title, path: urlPath }) => { | ||
it(title, () => { | ||
if (title === 'external asset is archived') { | ||
// mock the external image (which we'll archive) | ||
cy.intercept('https://some.external/domain/image.png', { fixture: 'pink.png' }); | ||
} | ||
if (skippedTestCases.includes(title)) { | ||
it.skip(title, () => {}); | ||
} else { | ||
it(title, () => { | ||
if (title === 'external asset is archived') { | ||
// mock the external image (which we'll archive) | ||
cy.intercept('https://some.external/domain/image.png', { fixture: 'pink.png' }); | ||
} | ||
|
||
cy.visit(`http://localhost:3000/${urlPath}`); | ||
}); | ||
cy.visit(`http://localhost:3000/${urlPath}`); | ||
}); | ||
} | ||
}); | ||
}); |
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