mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 10:23:14 -04:00
* updates naming in integration * updates naming in objects * updates naming in screens * updates naming in support * updates naming in tasks * fixes failing test Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
41 lines
1.4 KiB
JavaScript
41 lines
1.4 KiB
JavaScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License;
|
|
* you may not use this file except in compliance with the Elastic License.
|
|
*/
|
|
|
|
// ***********************************************
|
|
// This example commands.js shows you how to
|
|
// create various custom commands and overwrite
|
|
// existing commands.
|
|
//
|
|
// For more comprehensive examples of custom
|
|
// commands please read more here:
|
|
// https://on.cypress.io/custom-commands
|
|
// ***********************************************
|
|
//
|
|
//
|
|
// -- This is a parent command --
|
|
// Cypress.Commands.add("login", (email, password) => { ... })
|
|
//
|
|
//
|
|
// -- This is a child command --
|
|
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
|
|
//
|
|
//
|
|
// -- This is a dual command --
|
|
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
|
|
//
|
|
//
|
|
// -- This is will overwrite an existing command --
|
|
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
|
|
|
|
Cypress.Commands.add('stubSecurityApi', function (dataFileName) {
|
|
cy.on('window:before:load', (win) => {
|
|
// @ts-ignore no null, this is a temp hack see issue above
|
|
win.fetch = null;
|
|
});
|
|
cy.server();
|
|
cy.fixture(dataFileName).as(`${dataFileName}JSON`);
|
|
cy.route('POST', 'api/solutions/security/graphql', `@${dataFileName}JSON`);
|
|
});
|