Skip to content

Instantly share code, notes, and snippets.

@lydemann
Created July 3, 2019 06:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lydemann/f8b7c7398602734c474a979f03642db6 to your computer and use it in GitHub Desktop.
Save lydemann/f8b7c7398602734c474a979f03642db6 to your computer and use it in GitHub Desktop.
todo.spec.ts
import { TodoPage } from '../support/todo.po';
const todoList = [
{
id: 'task1',
title: 'Do1',
description: 'Remember to buy milk'
},
{
id: 'task2',
title: 'Do2',
description: 'Remember to work out'
}
];
describe('Todo', () => {
beforeEach(() => {
cy.server();
cy.route('http://localhost:8080/api/todo-list', todoList);
cy.visit('/');
});
it('should should show todo items', () => {
TodoPage.checkForTodos(todoList);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment