removes logout (#54098) (#54108)

This commit is contained in:
MadameSheema 2020-01-08 10:30:33 +01:00 committed by GitHub
parent 570aec8039
commit 5a7037142e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 0 additions and 89 deletions

View file

@ -1,15 +0,0 @@
/*
* 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.
*/
export const logout = (): null => {
cy.request({
method: 'GET',
url: `${Cypress.config().baseUrl}/logout`,
}).then(response => {
expect(response.status).to.eq(200);
});
return null;
};

View file

@ -1,11 +0,0 @@
/*
* 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.
*/
/** The avatar / button that represents the logged-in Kibana user */
export const USER_MENU = '[data-test-subj="userMenuButton"]';
/** Clicking this link logs out the currently logged-in Kibana user */
export const LOGOUT_LINK = '[data-test-subj="logoutLink"]';

View file

@ -10,7 +10,6 @@ import {
FIELDS_BROWSER_SELECTED_CATEGORY_TITLE,
FIELDS_BROWSER_TITLE,
} from '../../lib/fields_browser/selectors';
import { logout } from '../../lib/logout';
import { HOSTS_PAGE } from '../../lib/urls';
import { loginAndWaitForPage, DEFAULT_TIMEOUT } from '../../lib/util/helpers';
import {
@ -46,10 +45,6 @@ describe('Events Viewer', () => {
clickEventsTab();
});
afterEach(() => {
return logout();
});
it('renders the fields browser with the expected title when the Events Viewer Fields Browser button is clicked', () => {
openEventsViewerFieldsBrowser();

View file

@ -22,7 +22,6 @@ import {
FIELDS_BROWSER_SYSTEM_CATEGORIES_COUNT,
FIELDS_BROWSER_TITLE,
} from '../../lib/fields_browser/selectors';
import { logout } from '../../lib/logout';
import { HOSTS_PAGE } from '../../lib/urls';
import { loginAndWaitForPage, DEFAULT_TIMEOUT } from '../../lib/util/helpers';
@ -42,10 +41,6 @@ describe('Fields Browser', () => {
loginAndWaitForPage(HOSTS_PAGE);
});
afterEach(() => {
return logout();
});
it('renders the fields browser with the expected title when the Fields button is clicked', () => {
populateTimeline();

View file

@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { logout } from '../../lib/logout';
import { HOSTS_PAGE } from '../../lib/urls';
import {
INSPECT_BUTTON_ICON,
@ -18,9 +17,6 @@ import { executeKQL, hostExistsQuery, toggleTimelineVisibility } from '../../lib
describe('Inspect', () => {
describe('Hosts and network stats and tables', () => {
afterEach(() => {
return logout();
});
INSPECT_BUTTONS_IN_SIEM.map(table =>
it(`inspects the ${table.title}`, () => {
loginAndWaitForPage(table.url);
@ -36,10 +32,6 @@ describe('Inspect', () => {
});
describe('Timeline', () => {
afterEach(() => {
return logout();
});
it('inspects the timeline', () => {
loginAndWaitForPage(HOSTS_PAGE);
toggleTimelineVisibility();

View file

@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { logout } from '../../lib/logout';
import {
mlNetworkSingleIpNullKqlQuery,
mlNetworkSingleIpKqlQuery,
@ -24,10 +23,6 @@ import { loginAndWaitForPage } from '../../lib/util/helpers';
import { KQL_INPUT } from '../../lib/url_state';
describe('ml conditional links', () => {
afterEach(() => {
return logout();
});
it('sets the KQL from a single IP with a value for the query', () => {
loginAndWaitForPage(mlNetworkSingleIpKqlQuery);
cy.get(KQL_INPUT, { timeout: 5000 }).should(

View file

@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { logout } from '../../lib/logout';
import { OVERVIEW_PAGE, TIMELINES_PAGE } from '../../lib/urls';
import {
NAVIGATION_HOSTS,
@ -15,10 +14,6 @@ import {
import { loginAndWaitForPage } from '../../lib/util/helpers';
describe('top-level navigation common to all pages in the SIEM app', () => {
afterEach(() => {
return logout();
});
it('navigates to the Overview page', () => {
loginAndWaitForPage(TIMELINES_PAGE);

View file

@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { logout } from '../../lib/logout';
import { OVERVIEW_PAGE } from '../../lib/urls';
import { clearFetch, stubApi } from '../../lib/fixtures/helpers';
import { HOST_STATS, NETWORK_STATS, STAT_AUDITD } from '../../lib/overview/selectors';
@ -17,10 +16,6 @@ describe('Overview Page', () => {
loginAndWaitForPage(OVERVIEW_PAGE);
});
afterEach(() => {
return logout();
});
it('Host and Network stats render with correct values', () => {
cy.get(STAT_AUDITD.domId);

View file

@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { logout } from '../../lib/logout';
import { HOSTS_PAGE_TAB_URLS } from '../../lib/urls';
import {
AUTHENTICATIONS_TABLE,
@ -19,10 +18,6 @@ import {
import { DEFAULT_TIMEOUT, loginAndWaitForPage, waitForTableLoad } from '../../lib/util/helpers';
describe('Pagination', () => {
afterEach(() => {
return logout();
});
it('pagination updates results and page number', () => {
loginAndWaitForPage(HOSTS_PAGE_TAB_URLS.uncommonProcesses);
waitForTableLoad(UNCOMMON_PROCCESSES_TABLE);

View file

@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { logout } from '../../lib/logout';
import {
TIMELINE_DATA_PROVIDERS,
TIMELINE_DROPPED_DATA_PROVIDERS,
@ -22,10 +21,6 @@ describe('timeline data providers', () => {
loginAndWaitForPage(HOSTS_PAGE);
});
afterEach(() => {
return logout();
});
it('renders the data provider of a host dragged from the All Hosts widget on the hosts page', () => {
waitForAllHostsWidget();

View file

@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { logout } from '../../lib/logout';
import {
TIMELINE_FLYOUT_BODY,
TIMELINE_NOT_READY_TO_DROP_BUTTON,
@ -21,10 +20,6 @@ describe('timeline flyout button', () => {
loginAndWaitForPage(HOSTS_PAGE);
});
afterEach(() => {
return logout();
});
it('toggles open the timeline', () => {
toggleTimelineVisibility();

View file

@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { logout } from '../../lib/logout';
import {
assertAtLeastOneEventMatchesSearch,
executeKQL,
@ -19,10 +18,6 @@ describe('timeline search or filter KQL bar', () => {
loginAndWaitForPage(HOSTS_PAGE);
});
afterEach(() => {
return logout();
});
it('executes a KQL query', () => {
toggleTimelineVisibility();

View file

@ -6,7 +6,6 @@
import { drag, drop } from '../../lib/drag_n_drop/helpers';
import { populateTimeline } from '../../lib/fields_browser/helpers';
import { logout } from '../../lib/logout';
import { toggleFirstTimelineEventDetails } from '../../lib/timeline/helpers';
import { HOSTS_PAGE } from '../../lib/urls';
import { loginAndWaitForPage, DEFAULT_TIMEOUT } from '../../lib/util/helpers';
@ -16,10 +15,6 @@ describe('toggle column in timeline', () => {
loginAndWaitForPage(HOSTS_PAGE);
});
afterEach(() => {
return logout();
});
const timestampField = '@timestamp';
const idField = '_id';

View file

@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { logout } from '../../lib/logout';
import {
ABSOLUTE_DATE_RANGE,
DATE_PICKER_ABSOLUTE_INPUT,
@ -33,10 +32,6 @@ import { waitForAllHostsWidget } from '../../lib/hosts/helpers';
import { NAVIGATION_HOSTS_ALL_HOSTS, NAVIGATION_HOSTS_ANOMALIES } from '../../lib/hosts/selectors';
describe('url state', () => {
afterEach(() => {
return logout();
});
it('sets the global start and end dates from the url', () => {
loginAndWaitForPage(ABSOLUTE_DATE_RANGE.url);
cy.get(DATE_PICKER_START_DATE_POPOVER_BUTTON).should(