mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-21 17:26:29 -05:00
762a0a850e
Doing this BEFORE the merge prevents a lot of merge conflicts. Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
19 lines
583 B
TypeScript
19 lines
583 B
TypeScript
/*
|
|
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
|
*
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
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')
|
|
})
|