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

35 lines (34 loc) 1.68 kB
"use strict"; // / <reference types="cypress" /> /** * 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. */ Object.defineProperty(exports, "__esModule", { value: true }); require("@testing-library/cypress/add-commands"); require("cypress-axe"); const __common_1 = require("../cucumber/step_definitions/cypress/_.common"); require("cypress-real-events"); const a11y_engine_1 = require("../cucumber/step_definitions/cypress/a11y-engine"); Cypress.Commands.add("uuvGetContext", __common_1.uuvGetContext); Cypress.Commands.add("uuvCheckContextWithinFocusedElement", __common_1.uuvCheckContextWithinFocusedElement); Cypress.Commands.add("uuvPatchContext", __common_1.uuvPatchContext); Cypress.Commands.add("uuvFindByText", __common_1.uuvFindByText); Cypress.Commands.add("uuvFindByTestId", __common_1.uuvFindByTestId); Cypress.Commands.add("uuvFindByRole", __common_1.uuvFindByRole); Cypress.Commands.add("uuvFindByLabelText", __common_1.uuvFindByLabelText); Cypress.Commands.add("uuvFindAllByRole", __common_1.uuvFindAllByRole); Cypress.Commands.add("uuvFoundedElement", { prevSubject: true }, __common_1.uuvFoundedElement); Cypress.Commands.add("injectUvvA11y", a11y_engine_1.injectUvvA11y); Cypress.Commands.add("checkUvvA11y", a11y_engine_1.checkUvvA11y); Cypress.Commands.add("showUvvA11yReport", a11y_engine_1.showUvvA11yReport); const chaiSubset = require("chai-subset"); chai.use(chaiSubset);