mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-12-12 09:13:33 -05:00
28600d6508
* Change copyright year from 2020 to 2021 Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> * Change copyright year in jetbrains copyright template Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
21 lines
649 B
TypeScript
21 lines
649 B
TypeScript
/*
|
|
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
|
*
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
// 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')
|
|
})
|