fix: tests
This commit is contained in:
parent
964fdeb2e8
commit
ec2587bb60
2 changed files with 11 additions and 11 deletions
|
@ -72,7 +72,7 @@ describe('Namepaces', () => {
|
||||||
cy.get('.namespace-container .menu.namespaces-lists')
|
cy.get('.namespace-container .menu.namespaces-lists')
|
||||||
.should('contain', newNamespaceName)
|
.should('contain', newNamespaceName)
|
||||||
.should('not.contain', newNamespaces[0].title)
|
.should('not.contain', newNamespaces[0].title)
|
||||||
cy.get('.content.namespaces-list')
|
cy.get('.content')
|
||||||
.should('contain', newNamespaceName)
|
.should('contain', newNamespaceName)
|
||||||
.should('not.contain', newNamespaces[0].title)
|
.should('not.contain', newNamespaces[0].title)
|
||||||
})
|
})
|
||||||
|
@ -99,7 +99,7 @@ describe('Namepaces', () => {
|
||||||
.should('not.contain', newNamespaces[0].title)
|
.should('not.contain', newNamespaces[0].title)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should not show archived lists & namespaces if the filter is not checked', () => {
|
it.only('Should not show archived lists & namespaces if the filter is not checked', () => {
|
||||||
const n = NamespaceFactory.create(1, {
|
const n = NamespaceFactory.create(1, {
|
||||||
id: 2,
|
id: 2,
|
||||||
is_archived: true,
|
is_archived: true,
|
||||||
|
@ -116,30 +116,30 @@ describe('Namepaces', () => {
|
||||||
|
|
||||||
// Initial
|
// Initial
|
||||||
cy.visit('/namespaces')
|
cy.visit('/namespaces')
|
||||||
cy.get('.namespaces-list .namespace')
|
cy.get('.namespace')
|
||||||
.should('not.contain', 'Archived')
|
.should('not.contain', 'Archived')
|
||||||
|
|
||||||
// Show archived
|
// Show archived
|
||||||
cy.get('.namespaces-list .fancycheckbox.show-archived-check label.check span')
|
cy.get('[data-cy="show-archived-check"] label.check span')
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
.click()
|
.click()
|
||||||
cy.get('.namespaces-list .fancycheckbox.show-archived-check input')
|
cy.get('[data-cy="show-archived-check"] input')
|
||||||
.should('be.checked')
|
.should('be.checked')
|
||||||
cy.get('.namespaces-list .namespace')
|
cy.get('.namespace')
|
||||||
.should('contain', 'Archived')
|
.should('contain', 'Archived')
|
||||||
|
|
||||||
// Don't show archived
|
// Don't show archived
|
||||||
cy.get('.namespaces-list .fancycheckbox.show-archived-check label.check span')
|
cy.get('[data-cy="show-archived-check"] label.check span')
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
.click()
|
.click()
|
||||||
cy.get('.namespaces-list .fancycheckbox.show-archived-check input')
|
cy.get('[data-cy="show-archived-check"] input')
|
||||||
.should('not.be.checked')
|
.should('not.be.checked')
|
||||||
|
|
||||||
// Second time visiting after unchecking
|
// Second time visiting after unchecking
|
||||||
cy.visit('/namespaces')
|
cy.visit('/namespaces')
|
||||||
cy.get('.namespaces-list .fancycheckbox.show-archived-check input')
|
cy.get('[data-cy="show-archived-check"] input')
|
||||||
.should('not.be.checked')
|
.should('not.be.checked')
|
||||||
cy.get('.namespaces-list .namespace')
|
cy.get('.namespace')
|
||||||
.should('not.contain', 'Archived')
|
.should('not.contain', 'Archived')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="content loader-container" :class="{'is-loading': loading}">
|
<div class="content loader-container" :class="{'is-loading': loading}">
|
||||||
<div class="create-buttons">
|
<div class="create-buttons">
|
||||||
<fancycheckbox v-model="showArchived" @change="saveShowArchivedState">
|
<fancycheckbox v-model="showArchived" @change="saveShowArchivedState" v-cy="'show-archived-check'">
|
||||||
{{ $t('namespace.showArchived') }}
|
{{ $t('namespace.showArchived') }}
|
||||||
</fancycheckbox>
|
</fancycheckbox>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue