mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
* improves 'Creates and activates a new custom rule' test * fixes constant problem * improves 'Creates and activates a new custom rule with override option' test * improves 'Creates and activates a new threshold rule' test * refactor * fixes type check issue * improves assertions * removes unused code * changes variables for constants * improves 'waitForTheRuleToBeExecuted' test * improves readability * fixes jenkins error * refactor * refactor Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
27 lines
832 B
TypeScript
27 lines
832 B
TypeScript
/*
|
|
* 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.
|
|
*/
|
|
|
|
import { KQL_INPUT, REFRESH_BUTTON } from '../screens/security_header';
|
|
|
|
export const clearSearchBar = () => {
|
|
cy.get(KQL_INPUT).clear().type('{enter}');
|
|
};
|
|
|
|
export const kqlSearch = (search: string) => {
|
|
cy.get(KQL_INPUT).type(search);
|
|
};
|
|
|
|
export const navigateFromHeaderTo = (page: string) => {
|
|
cy.get(page).click({ force: true });
|
|
};
|
|
|
|
export const refreshPage = () => {
|
|
cy.get(REFRESH_BUTTON).click({ force: true }).invoke('text').should('not.equal', 'Updating');
|
|
};
|
|
|
|
export const waitForThePageToBeUpdated = () => {
|
|
cy.get(REFRESH_BUTTON).should('not.equal', 'Updating');
|
|
};
|