Skip to content

Commit

Permalink
Remove manual sync for now
Browse files Browse the repository at this point in the history
  • Loading branch information
taniarascia committed Oct 16, 2020
1 parent 9df56a2 commit 295fdc6
Showing 1 changed file with 41 additions and 41 deletions.
82 changes: 41 additions & 41 deletions tests/e2e/integration/note.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,47 +291,47 @@ describe('Manage notes test', () => {
})

// TODO: add manual sync back in
// it('should sync some notes', function () {
// const noteOneTitle = 'note 1'
// const noteTwoTitle = 'same note title'
// const noteThreeTitle = 'same note title'
// const noteFourTitle = 'note 4'

// Cypress.on('window:before:unload', (event: BeforeUnloadEvent) =>
// expect(event.returnValue).to.equal('')
// )

// // start with a refresh so we know our current saved state
// cy.reload()
// getNoteCount('allNoteStartCount')

// // create a new note and refresh without syncing
// clickCreateNewNote()
// typeNoteEditor(noteOneTitle)
// cy.reload()
// cy.then(() => assertNoteListLengthEquals(this.allNoteStartCount))

// // create a few new notes and sync them
// clickCreateNewNote()
// typeNoteEditor(noteOneTitle)
// clickCreateNewNote()
// typeNoteEditor(noteTwoTitle)
// clickCreateNewNote()
// typeNoteEditor(noteThreeTitle)
// clickCreateNewNote()
// typeNoteEditor(noteFourTitle)
// clickSyncNotes()

// // make sure notes persisted
// cy.reload()
// cy.then(() => assertNoteListLengthEquals(this.allNoteStartCount + 4))

// // make sure order is correct
// assertNoteListTitleAtIndex(3, noteOneTitle)
// assertNoteListTitleAtIndex(2, noteTwoTitle)
// assertNoteListTitleAtIndex(1, noteThreeTitle)
// assertNoteListTitleAtIndex(0, noteFourTitle)
// })
it.skip('should sync some notes', function () {
const noteOneTitle = 'note 1'
const noteTwoTitle = 'same note title'
const noteThreeTitle = 'same note title'
const noteFourTitle = 'note 4'

Cypress.on('window:before:unload', (event: BeforeUnloadEvent) =>
expect(event.returnValue).to.equal('')
)

// start with a refresh so we know our current saved state
cy.reload()
getNoteCount('allNoteStartCount')

// create a new note and refresh without syncing
clickCreateNewNote()
typeNoteEditor(noteOneTitle)
cy.reload()
cy.then(() => assertNoteListLengthEquals(this.allNoteStartCount))

// create a few new notes and sync them
clickCreateNewNote()
typeNoteEditor(noteOneTitle)
clickCreateNewNote()
typeNoteEditor(noteTwoTitle)
clickCreateNewNote()
typeNoteEditor(noteThreeTitle)
clickCreateNewNote()
typeNoteEditor(noteFourTitle)
clickSyncNotes()

// make sure notes persisted
cy.reload()
cy.then(() => assertNoteListLengthEquals(this.allNoteStartCount + 4))

// make sure order is correct
assertNoteListTitleAtIndex(3, noteOneTitle)
assertNoteListTitleAtIndex(2, noteTwoTitle)
assertNoteListTitleAtIndex(1, noteThreeTitle)
assertNoteListTitleAtIndex(0, noteFourTitle)
})

it('should search some notes', function () {
const noteOneTitle = 'note 1'
Expand Down

0 comments on commit 295fdc6

Please sign in to comment.