Skip to content

Commit

Permalink
chore: wait for two todos in the store before comparing
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Nov 27, 2017
1 parent 247f4aa commit 00fc33e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cypress/integration/store-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ describe('UI to Vuex store', () => {
it('stores todos in the store', () => {
enterTodo('first todo')
enterTodo('second todo')

getStore().its('state.todos').should('have.length', 2)

const removeIds = list => list.map(todo => Cypress._.omit(todo, 'id'))
getStore().its('state.todos').then(removeIds).should('deep.equal', [
{
Expand All @@ -65,6 +68,9 @@ describe('UI to Vuex store', () => {
stubMathRandom()
enterTodo('first todo')
enterTodo('second todo')

getStore().its('state.todos').should('have.length', 2)

getStore().its('state.todos').should('deep.equal', [
{
title: 'first todo',
Expand Down

0 comments on commit 00fc33e

Please sign in to comment.