feat: add guilds list in left sidebar

This commit is contained in:
Divlo
2021-11-18 22:47:46 +01:00
parent accd36d1fc
commit ad945d7a7a
33 changed files with 1511 additions and 1017 deletions

View File

@ -1,3 +1,4 @@
import { getGuildsHandler } from '../../../fixtures/guilds/get'
import { authenticationHandlers } from '../../../fixtures/handler'
const applicationPaths = [
@ -22,14 +23,23 @@ describe('Pages > /application', () => {
})
it('should not redirect the user if signed in', () => {
cy.task('startMockServer', authenticationHandlers).setCookie(
'refreshToken',
'refresh-token'
)
cy.task('startMockServer', [
...authenticationHandlers,
getGuildsHandler
]).setCookie('refreshToken', 'refresh-token')
for (const applicationPath of applicationPaths) {
cy.visit(applicationPath)
.location('pathname')
.should('eq', applicationPath)
}
})
it('should shows all the guilds of the current user in left sidebar', () => {
cy.task('startMockServer', [
...authenticationHandlers,
getGuildsHandler
]).setCookie('refreshToken', 'refresh-token')
cy.visit('/application')
cy.get('.guilds-list').children().should('have.length', 2)
})
})