Switch the base framework from Create React App to Next.JS

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Renovate Bot 2021-12-25 15:44:24 +00:00 committed by Tilman Vatteroth
parent a979b6ffdd
commit 77a60c6c48
361 changed files with 5130 additions and 9605 deletions

View file

@ -29,63 +29,63 @@ describe('Motd', () => {
it('shows the correct alert Motd text', () => {
mockExistingMotd()
cy.visit('/')
cy.getById('motd').contains(motdMockContent)
cy.getByCypressId('motd').contains(motdMockContent)
})
it('can be dismissed', () => {
mockExistingMotd()
cy.visit('/')
cy.getById('motd').contains(motdMockContent)
cy.getById('motd-dismiss')
cy.getByCypressId('motd').contains(motdMockContent)
cy.getByCypressId('motd-dismiss')
.click()
.then(() => {
expect(localStorage.getItem(MOTD_LOCAL_STORAGE_KEY)).to.equal(MOCK_LAST_MODIFIED)
})
cy.getById('motd').should('not.exist')
cy.getByCypressId('motd').should('not.exist')
})
it("won't show again after dismiss and reload", () => {
mockExistingMotd()
cy.visit('/')
cy.getById('motd').contains(motdMockContent)
cy.getById('motd-dismiss')
cy.getByCypressId('motd').contains(motdMockContent)
cy.getByCypressId('motd-dismiss')
.click()
.then(() => {
expect(localStorage.getItem(MOTD_LOCAL_STORAGE_KEY)).to.equal(MOCK_LAST_MODIFIED)
})
cy.getById('motd').should('not.exist')
cy.getByCypressId('motd').should('not.exist')
cy.reload()
cy.get('main').should('exist')
cy.getById('motd').should('not.exist')
cy.getByCypressId('motd').should('not.exist')
})
it('will show again after reload without dismiss', () => {
mockExistingMotd()
cy.visit('/')
cy.getById('motd').contains(motdMockContent)
cy.getByCypressId('motd').contains(motdMockContent)
cy.reload()
cy.get('main').should('exist')
cy.getById('motd').contains(motdMockContent)
cy.getByCypressId('motd').contains(motdMockContent)
})
it("won't show again after dismiss and page navigation", () => {
mockExistingMotd()
cy.visit('/')
cy.getById('motd').contains(motdMockContent)
cy.getById('motd-dismiss')
cy.getByCypressId('motd').contains(motdMockContent)
cy.getByCypressId('motd-dismiss')
.click()
.then(() => {
expect(localStorage.getItem(MOTD_LOCAL_STORAGE_KEY)).to.equal(MOCK_LAST_MODIFIED)
})
cy.getById('motd').should('not.exist')
cy.getById('navLinkHistory').click()
cy.getByCypressId('motd').should('not.exist')
cy.getByCypressId('navLinkHistory').click()
cy.get('main').should('exist')
cy.getById('motd').should('not.exist')
cy.getByCypressId('motd').should('not.exist')
})
it("won't show if no file exists", () => {
cy.visit('/')
cy.get('main').should('exist')
cy.getById('motd').should('not.exist')
cy.getByCypressId('motd').should('not.exist')
})
})