Skip to content

Commit 2a4950d

Browse files
author
Tiffany Le-Nguyen
committed
chore: add test on deployed url
1 parent 46cc4e5 commit 2a4950d

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

demo/cypress/integration/test.spec.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
describe('TypeScript spec', () => {
2-
it('works', () => {
3-
cy.wrap('foo').should('equal', 'foo')
2+
beforeEach(() => {
3+
cy.visit('/')
4+
})
5+
6+
it('loads home page', () => {
7+
cy.findByText('Next Demo!')
48
})
59
})

demo/netlify.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ command = "next build"
33
publish = ".next"
44
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../"
55

6+
[build.environment]
7+
# cache Cypress binary in local "node_modules" folder
8+
# so Netlify caches it
9+
CYPRESS_CACHE_FOLDER = "../node_modules/CypressBinary"
10+
611
[dev]
712
framework = "#static"
813

0 commit comments

Comments
 (0)