spec.js 431 B

12345678910111213141516171819
  1. describe('Sapper template app', () => {
  2. beforeEach(() => {
  3. cy.visit('/')
  4. });
  5. it('has the correct <h1>', () => {
  6. cy.contains('h1', 'Great success!')
  7. });
  8. it('navigates to /about', () => {
  9. cy.get('nav a').contains('about').click();
  10. cy.url().should('include', '/about');
  11. });
  12. it('navigates to /blog', () => {
  13. cy.get('nav a').contains('blog').click();
  14. cy.url().should('include', '/blog');
  15. });
  16. });