fix: cache with duplicated data

This commit is contained in:
Divlo
2022-08-30 21:30:06 +02:00
parent 3d185bf044
commit a068d31d14
22 changed files with 98 additions and 95 deletions

View File

@ -241,8 +241,8 @@ describe('Pages > /application/[guildId]/[channelId]', () => {
cy.visit('/application/abc/abc', {
failOnStatusCode: false
})
.location('pathname')
.should('eq', '/404')
.get('[data-cy=status-code]')
.contains('404')
})
it("should redirect the user to `/404` if `guildId` doesn't exist", () => {
@ -253,8 +253,8 @@ describe('Pages > /application/[guildId]/[channelId]', () => {
cy.visit(`/application/123/${channelExample.id}`, {
failOnStatusCode: false
})
.location('pathname')
.should('eq', '/404')
.get('[data-cy=status-code]')
.contains('404')
})
it("should redirect the user to `/404` if `channelId` doesn't exist", () => {
@ -263,8 +263,8 @@ describe('Pages > /application/[guildId]/[channelId]', () => {
getGuildMemberWithGuildIdHandler
]).setCookie('refreshToken', 'refresh-token')
cy.visit(`/application/${guildExample.id}/123`, { failOnStatusCode: false })
.location('pathname')
.should('eq', '/404')
.get('[data-cy=status-code]')
.contains('404')
})
})

View File

@ -92,8 +92,8 @@ describe('Pages > /application/[guildId]/[channelId]/settings', () => {
cy.visit(`/application/${guildExample.id}/${channelExample.id}/settings`, {
failOnStatusCode: false
})
.location('pathname')
.should('eq', '/404')
.get('[data-cy=status-code]')
.contains('404')
})
it('should redirect the user to `/404` if `guildId` or `channelId` are not numbers', () => {
@ -104,8 +104,8 @@ describe('Pages > /application/[guildId]/[channelId]/settings', () => {
cy.visit('/application/abc/abc/settings', {
failOnStatusCode: false
})
.location('pathname')
.should('eq', '/404')
.get('[data-cy=status-code]')
.contains('404')
})
it("should redirect the user to `/404` if `guildId` doesn't exist", () => {
@ -116,8 +116,8 @@ describe('Pages > /application/[guildId]/[channelId]/settings', () => {
cy.visit(`/application/123/${channelExample.id}/settings`, {
failOnStatusCode: false
})
.location('pathname')
.should('eq', '/404')
.get('[data-cy=status-code]')
.contains('404')
})
it("should redirect the user to `/404` if `channelId` doesn't exist", () => {
@ -128,8 +128,8 @@ describe('Pages > /application/[guildId]/[channelId]/settings', () => {
cy.visit(`/application/${guildExample.id}/123/settings`, {
failOnStatusCode: false
})
.location('pathname')
.should('eq', '/404')
.get('[data-cy=status-code]')
.contains('404')
})
})

View File

@ -56,8 +56,8 @@ describe('Pages > /application/[guildId]/channels/create', () => {
cy.visit('/application/abc/channels/create', {
failOnStatusCode: false
})
.location('pathname')
.should('eq', '/404')
.get('[data-cy=status-code]')
.contains('404')
})
it("should redirect the user to `/404` if `guildId` doesn't exist", () => {
@ -68,8 +68,8 @@ describe('Pages > /application/[guildId]/channels/create', () => {
cy.visit(`/application/123/channels/create`, {
failOnStatusCode: false
})
.location('pathname')
.should('eq', '/404')
.get('[data-cy=status-code]')
.contains('404')
})
})

View File

@ -86,8 +86,8 @@ describe('Pages > /application/[guildId]/settings', () => {
cy.visit('/application/abc/settings', {
failOnStatusCode: false
})
.location('pathname')
.should('eq', '/404')
.get('[data-cy=status-code]')
.contains('404')
})
it("should redirect the user to `/404` if `guildId` doesn't exist", () => {
@ -98,8 +98,8 @@ describe('Pages > /application/[guildId]/settings', () => {
cy.visit(`/application/123/settings`, {
failOnStatusCode: false
})
.location('pathname')
.should('eq', '/404')
.get('[data-cy=status-code]')
.contains('404')
})
})