UNPKG

@uuv/cypress

Version:

A solution to facilitate the writing and execution of E2E tests understandable by any human being using cucumber(BDD) and cypress

41 lines (40 loc) 2.18 kB
/** * Software Name : UUV * * SPDX-License-Identifier: MIT * * This software is distributed under the MIT License, * see the "LICENSE" file for more details * * Authors: NJAKO MOLOM Louis Fredice & SERVICAL Stanley * Software description: Make test writing fast, understandable by any human * understanding English or French. */ import { ByRoleOptions } from "@testing-library/cypress"; import { Context } from "./_context"; import Chainable = Cypress.Chainable; import { A11yReferenceEnum } from "@uuv/a11y"; import { DataTable } from "@badeball/cypress-cucumber-preprocessor"; export declare const shouldGenerateA11yReport: () => boolean; export declare const getA11yResultFilePath: () => string; export declare const uuvGetContext: () => Chainable<Context>; export declare function uuvCheckContextWithinFocusedElement(dontThrowError?: boolean): Cypress.Chainable<Context>; export declare function uuvPatchContext(partOfContext: any): Cypress.Chainable<Context>; export declare function removeHeaderSeparatorLine(pExpectedElementsOfList: DataTable): string[][]; export declare function expectTableToHaveContent(expectedElementsOfList: string[][], cellAccessibleRole: string): void; export declare function uuvFindAllByRole(role: string, roleOptions: ByRoleOptions): Cypress.Chainable<JQuery<HTMLElement>>; export declare function uuvFindByRole(role: string, roleOptions: ByRoleOptions): Cypress.Chainable<JQuery<HTMLElement>>; export declare function uuvFindByLabelText(labelTextToSearch: string, roleOptions: ByRoleOptions): Cypress.Chainable<JQuery<HTMLElement>>; export declare function uuvFindByText(textToSearch: string, roleOptions: ByRoleOptions): Cypress.Chainable<JQuery<HTMLElement>>; export declare function uuvFindByTestId(testId: string): Cypress.Chainable<JQuery<HTMLElement>>; export declare function uuvFoundedElement(subject: any): Cypress.Chainable<JQuery<HTMLElement>>; export declare function pressKey(key: string): void; export type UuvA11yOptions = { reference: A11yReferenceEnum; runnerOptions?: any; expectedResult?: UuvA11yExpectedResult; }; export type UuvA11yExpectedResult = { value: any; isContainsMode?: boolean; };