mirror of
https://github.com/koel/koel
synced 2024-11-10 14:44:13 +00:00
fix(test): fix Settings tests
This commit is contained in:
parent
4696ac7558
commit
2fd249e984
1 changed files with 4 additions and 7 deletions
|
@ -4,7 +4,7 @@ context('Settings', () => {
|
|||
cy.$clickSidebarItem('Settings')
|
||||
})
|
||||
|
||||
it('rescans and reloads', () => {
|
||||
it('rescans media', () => {
|
||||
cy.intercept('GET', '/api/settings', {})
|
||||
|
||||
cy.get('#settingsWrapper').within(() => {
|
||||
|
@ -13,14 +13,10 @@ context('Settings', () => {
|
|||
.and('contain.text', 'Settings')
|
||||
|
||||
cy.get('[name=media_path]').should('have.value', '/media/koel/')
|
||||
|
||||
// @ts-ignore
|
||||
cy.window().then(window => window.beforeReload = true)
|
||||
cy.window().should('have.prop', 'beforeReload', true)
|
||||
|
||||
cy.get('[type=submit]').click()
|
||||
cy.window().should('not.have.prop', 'beforeReload')
|
||||
})
|
||||
|
||||
cy.get('#overlay').should('be.visible')
|
||||
})
|
||||
|
||||
it('confirms before rescanning if media path is changed', () => {
|
||||
|
@ -34,5 +30,6 @@ context('Settings', () => {
|
|||
})
|
||||
|
||||
cy.$confirm()
|
||||
cy.get('#overlay').should('be.visible')
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue