-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #256 from vtexdocs/feat/tests
Feat/Tests
- Loading branch information
Showing
10 changed files
with
3,134 additions
and
3,196 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { defineConfig } from 'cypress' | ||
|
||
export default defineConfig({ | ||
fixturesFolder: 'src/tests/cypress/fixtures', | ||
screenshotsFolder: 'src/tests/cypress/screenshots', | ||
videosFolder: 'src/tests/cypress/videos', | ||
downloadsFolder: 'src/tests/cypress/downloads', | ||
e2e: { | ||
specPattern: 'src/tests/cypress/integration/**/*.cy.{js,jsx,ts,tsx}', | ||
supportFile: 'src/tests/cypress/support/index.js', | ||
baseUrl: 'http://localhost:3000', | ||
}, | ||
}) |
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
18 changes: 0 additions & 18 deletions
18
src/tests/cypress/integration/api-guides-documentation.spec.js
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
src/tests/cypress/integration/documentation-pages-status.cy.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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/// <reference types="cypress" /> | ||
|
||
import navigation from '../fixtures/navigation.json' | ||
|
||
describe('Status of documentation pages', () => { | ||
const visitDocumentationPages = (slugPrefix) => { | ||
const visitPages = ({ slug, type, children }) => { | ||
const page = `${slugPrefix}/${slug}` | ||
if (type === 'markdown' || type === 'openapi') | ||
it(`Checks page ${page}`, () => cy.visit(page)) | ||
|
||
children.forEach(visitPages) | ||
} | ||
|
||
return visitPages | ||
} | ||
|
||
navigation.navbar.forEach(({ slugPrefix, categories }) => { | ||
categories.forEach(visitDocumentationPages(slugPrefix)) | ||
}) | ||
}) |
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
Oops, something went wrong.