fix(deletion-modal): include note title fallback

The note deletion modal previously only used the set title of
the note. This commit changes the dialog to use the result of
useNoteTitle() which contains a fallback string.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
Erik Michelson 2023-06-30 15:22:27 +02:00
parent 2276b4205d
commit aacdc2a046
3 changed files with 6 additions and 6 deletions

View file

@ -16,7 +16,7 @@ describe('Delete note', () => {
})
cy.getByCypressId('sidebar.deleteNote.button').click()
cy.getByCypressId('sidebar.deleteNote.modal').should('be.visible')
cy.getByCypressId('sidebar.deleteNote.modal.noteTitle').should('be.visible').text().should('eq', '')
cy.getByCypressId('sidebar.deleteNote.modal.noteTitle').should('be.visible').text().should('eq', 'Untitled')
cy.getByCypressId('deletionModal.confirmButton').should('be.visible').click()
cy.getByCypressId('sidebar.deleteNote.modal').should('not.be.exist')
cy.getByCypressId('notification-toast').should('not.exist')
@ -28,7 +28,7 @@ describe('Delete note', () => {
})
cy.getByCypressId('sidebar.deleteNote.button').click()
cy.getByCypressId('sidebar.deleteNote.modal').should('be.visible')
cy.getByCypressId('sidebar.deleteNote.modal.noteTitle').should('be.visible').text().should('eq', '')
cy.getByCypressId('sidebar.deleteNote.modal.noteTitle').should('be.visible').text().should('eq', 'Untitled')
cy.getByCypressId('deletionModal.confirmButton').should('be.visible').click()
cy.getByCypressId('sidebar.deleteNote.modal').should('not.exist')
cy.getByCypressId('notification-toast').should('be.visible')