mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-29 22:35:50 -04:00
Switch the base framework from Create React App to Next.JS
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
a979b6ffdd
commit
77a60c6c48
361 changed files with 5130 additions and 9605 deletions
|
@ -5,19 +5,20 @@
|
|||
*/
|
||||
declare namespace Cypress {
|
||||
interface Chainable {
|
||||
getById(id: string): Chainable<Element>
|
||||
findById(id: string): Chainable<Element>
|
||||
getByCypressId(id: string): Chainable<Element>
|
||||
|
||||
findByCypressId(id: string): Chainable<Element>
|
||||
}
|
||||
}
|
||||
|
||||
const CYPRESS_ATTR = 'data-cypress-id'
|
||||
|
||||
Cypress.Commands.add('getById', (id: string) => {
|
||||
Cypress.Commands.add('getByCypressId', (id: string) => {
|
||||
return cy.get(`[${CYPRESS_ATTR}="${id}"]`)
|
||||
})
|
||||
|
||||
Cypress.Commands.add(
|
||||
'findById',
|
||||
'findByCypressId',
|
||||
{
|
||||
prevSubject: 'element'
|
||||
},
|
||||
|
|
|
@ -33,9 +33,9 @@ Cypress.Commands.add('getReveal', () => {
|
|||
})
|
||||
|
||||
Cypress.Commands.add('getMarkdownBody', () => {
|
||||
return cy.getIframeBody(RendererType.DOCUMENT).find('.markdown-body')
|
||||
return cy.getIframeBody(RendererType.DOCUMENT).findByCypressId('markdown-body')
|
||||
})
|
||||
|
||||
Cypress.Commands.add('getIntroBody', () => {
|
||||
return cy.getIframeBody(RendererType.INTRO).find('.markdown-body')
|
||||
return cy.getIframeBody(RendererType.INTRO).findByCypressId('markdown-body')
|
||||
})
|
||||
|
|
|
@ -15,6 +15,6 @@ declare namespace Cypress {
|
|||
}
|
||||
|
||||
Cypress.Commands.add('logout', () => {
|
||||
cy.getById('user-dropdown').click()
|
||||
cy.getById('user-dropdown-sign-out-button').click()
|
||||
cy.getByCypressId('user-dropdown').click()
|
||||
cy.getByCypressId('user-dropdown-sign-out-button').click()
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue