mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Security Solution] Unskipping Cypress local storage test (#161655)
This commit is contained in:
parent
91e065ebc4
commit
11856ab1d2
2 changed files with 18 additions and 15 deletions
|
@ -5,40 +5,40 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { cleanKibana, reload } from '../../../tasks/common';
|
||||
import { reload } from '../../../tasks/common';
|
||||
import { login, visit } from '../../../tasks/login';
|
||||
import { HOSTS_URL } from '../../../urls/navigation';
|
||||
import { openEvents } from '../../../tasks/hosts/main';
|
||||
import { DATAGRID_HEADERS } from '../../../screens/timeline';
|
||||
import { DATAGRID_HEADERS, DATAGRID_HEADER } from '../../../screens/timeline';
|
||||
import { waitsForEventsToBeLoaded } from '../../../tasks/hosts/events';
|
||||
import { removeColumn } from '../../../tasks/timeline';
|
||||
|
||||
// TODO: Fix bug in persisting the columns of timeline
|
||||
describe.skip('persistent timeline', () => {
|
||||
describe('persistent timeline', () => {
|
||||
before(() => {
|
||||
cleanKibana();
|
||||
login();
|
||||
visit(HOSTS_URL);
|
||||
openEvents();
|
||||
waitsForEventsToBeLoaded();
|
||||
|
||||
/* Stores in 'expectedNumberOfTimelineColumns' alias the number of columns we are going to have
|
||||
after the delition of the column */
|
||||
cy.get(DATAGRID_HEADERS).then((header) =>
|
||||
cy.wrap(header.length - 1).as('expectedNumberOfTimelineColumns')
|
||||
);
|
||||
});
|
||||
|
||||
it('persist the deletion of a column', function () {
|
||||
const MESSAGE_COLUMN = 'message';
|
||||
const MESSAGE_COLUMN_POSITION = 2;
|
||||
|
||||
cy.get(DATAGRID_HEADERS).eq(MESSAGE_COLUMN_POSITION).should('have.text', MESSAGE_COLUMN);
|
||||
removeColumn(MESSAGE_COLUMN);
|
||||
|
||||
cy.get(DATAGRID_HEADERS).should('have.length', this.expectedNumberOfTimelineColumns);
|
||||
/* For testing purposes we are going to use the message column */
|
||||
const COLUMN = 'message';
|
||||
|
||||
cy.get(DATAGRID_HEADER(COLUMN)).should('exist');
|
||||
removeColumn(COLUMN);
|
||||
reload();
|
||||
waitsForEventsToBeLoaded();
|
||||
|
||||
/* After the deletion of the message column and the reload of the page, we make sure
|
||||
we have the expected number of columns and that the message column is not displayed */
|
||||
cy.get(DATAGRID_HEADERS).should('have.length', this.expectedNumberOfTimelineColumns);
|
||||
cy.get(DATAGRID_HEADERS).each(($el) => expect($el.text()).not.equal(MESSAGE_COLUMN));
|
||||
cy.get(DATAGRID_HEADER(COLUMN)).should('not.exist');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -39,8 +39,11 @@ export const CREATE_NEW_TIMELINE_TEMPLATE = '[data-test-subj="template-timeline-
|
|||
|
||||
export const DATA_PROVIDERS = '.field-value';
|
||||
|
||||
export const DATAGRID_HEADERS =
|
||||
'[data-test-subj="events-viewer-panel"] [data-test-subj^="dataGridHeaderCell-"]';
|
||||
export const DATAGRID_HEADERS = '[data-test-subj^="dataGridHeaderCell-"]';
|
||||
|
||||
export const DATAGRID_HEADER = (header: string) => {
|
||||
return `[data-test-subj="dataGridHeaderCell-${header}"]`;
|
||||
};
|
||||
|
||||
export const DATE_PICKER_END = '[data-test-subj="superDatePickerendDatePopoverButton"]';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue