mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
Improve Server Pro tests to use semantic selectors (#29790)
* Replace placeholders with labels * Add 'Close dialog' label to modal close button to distinguish from footer Close button * Add and translate heading on the not found page * Update textarea to have id matching label's for attribute Simplify test for template description textarea * Label PDF zoom level dropdown button * Improve test selectors to use semantic roles and accessible names GitOrigin-RevId: d215ddca30ddf844cfffbcf0e528a601b134d772
This commit is contained in:
@@ -8,7 +8,9 @@ describe('Customization', function () {
|
||||
|
||||
it('should display the default right footer', function () {
|
||||
cy.visit('/')
|
||||
cy.get('footer').findByRole('link', { name: 'Fork on GitHub!' })
|
||||
cy.findByRole('contentinfo').findByRole('link', {
|
||||
name: 'Fork on GitHub!',
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@@ -25,16 +27,18 @@ describe('Customization', function () {
|
||||
|
||||
it('should display custom name', function () {
|
||||
cy.visit('/')
|
||||
cy.get('nav').findByText('CUSTOM APP NAME')
|
||||
cy.findByRole('navigation', { name: 'Primary' }).findByText(
|
||||
'CUSTOM APP NAME'
|
||||
)
|
||||
})
|
||||
|
||||
it('should display custom left footer', function () {
|
||||
cy.visit('/')
|
||||
cy.get('footer').findByText('CUSTOM LEFT FOOTER')
|
||||
cy.findByRole('contentinfo').findByText('CUSTOM LEFT FOOTER')
|
||||
})
|
||||
it('should display custom right footer', function () {
|
||||
cy.visit('/')
|
||||
cy.get('footer').findByText('CUSTOM RIGHT FOOTER')
|
||||
cy.findByRole('contentinfo').findByText('CUSTOM RIGHT FOOTER')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user