Skip to content

Commit

Permalink
fix: provide hostname and port to server (#1149)
Browse files Browse the repository at this point in the history
* fix: provide hostname and port

* chore: fix cypress

* chore: changes from review

* chore: change from review

* chore: lockfile back to v1

* chore: fix imports
  • Loading branch information
ascorbic authored Jan 24, 2022
1 parent 9b76223 commit 02053fd
Show file tree
Hide file tree
Showing 6 changed files with 3,706 additions and 22,289 deletions.
22 changes: 10 additions & 12 deletions cypress/integration/default/preview.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@ describe('Preview Mode', () => {
cy.findByText('Is preview? No')

// enter preview mode
cy.request('/api/enterPreview').then(
(response) => {
expect(response.body).to.have.property('name', 'preview mode')
}
)
cy.visit('/previewTest')
cy.findByText('Is preview? Yes!')
cy.request('/api/enterPreview').then((response) => {
expect(response.body).to.have.property('name', 'preview mode')
})
cy.visit('/previewTest')
cy.findByText('Is preview? Yes!', { selector: 'h1' })

// exit preview mode
cy.request('/api/exitPreview')
cy.visit('/previewTest')
cy.findByText('Is preview? No')
// exit preview mode
cy.request('/api/exitPreview')
cy.visit('/previewTest')
cy.findByText('Is preview? No', { selector: 'h1' })
})
})
})
Loading

0 comments on commit 02053fd

Please sign in to comment.