mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-29 23:58:47 -05:00
f0fe7f5ac2
- added e2e tests for - banner - history - intro - language - link - added e2e workflow - added cypress badge to README
15 lines
521 B
TypeScript
15 lines
521 B
TypeScript
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
declare namespace Cypress {
|
|
interface Chainable {
|
|
/**
|
|
* Custom command to check an external Link.
|
|
* @example cy.get(a#extern).checkExternalLink('http://example.com')
|
|
*/
|
|
checkExternalLink (url: string): Chainable<Element>
|
|
}
|
|
}
|
|
|
|
Cypress.Commands.add('checkExternalLink', { prevSubject: 'element' }, ($element: JQuery, url: string) => {
|
|
cy.wrap($element).should('have.attr', 'href', url)
|
|
.should('have.attr', 'target', '_blank')
|
|
})
|