chore: reformat sidebar tests

This commit is contained in:
Phan An 2022-04-28 00:03:05 +02:00
parent 36cbd7e325
commit 56b2134760
No known key found for this signature in database
GPG key ID: A81E4477F0BB6FDC

View file

@ -36,17 +36,11 @@ context('Sidebar Functionalities', () => {
cy.$loginAsNonAdmin()
cy.$each(commonMenuItems, assertMenuItem)
cy.$each(managementMenuItems, (text: string) => {
cy.get('#sidebar')
.findByText(text)
.should('not.exist')
})
cy.$each(managementMenuItems, (text: string) => cy.get('#sidebar').findByText(text).should('not.exist'))
})
it('does not have a YouTube item if YouTube is not used', () => {
cy.$login({ useYouTube: false })
cy.get('#sidebar')
.findByText('YouTube Video')
.should('not.exist')
cy.get('#sidebar').findByText('YouTube Video').should('not.exist')
})
})