mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Synthetics] organize uptime and synthetics e2e tests (#147782)
## Summary Organize Synthetics e2e tests into Uptime and Synthetics folders Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Shahzad <shahzad31comp@gmail.com>
This commit is contained in:
parent
2763af3a4e
commit
a67f30b46d
40 changed files with 59 additions and 51 deletions
|
@ -5,17 +5,5 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
export * from './data_view_permissions';
|
||||
export * from './read_only_user';
|
||||
export * from './synthetics';
|
||||
export * from './alerts';
|
||||
export * from './uptime.journey';
|
||||
export * from './step_duration.journey';
|
||||
export * from './monitor_details.journey';
|
||||
export * from './monitor_name.journey';
|
||||
export * from './monitor_management.journey';
|
||||
export * from './monitor_management_enablement.journey';
|
||||
export * from './monitor_details';
|
||||
export * from './locations';
|
||||
export * from './private_locations';
|
||||
export * from './detail_flyout';
|
||||
export * from './uptime';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
import uuid from 'uuid';
|
||||
import { journey, step, expect, Page } from '@elastic/synthetics';
|
||||
import { FormMonitorType } from '../../../common/runtime_types';
|
||||
import { syntheticsAppPageProvider } from '../../page_objects/synthetics_app';
|
||||
import { syntheticsAppPageProvider } from '../../page_objects/synthetics/synthetics_app';
|
||||
|
||||
const customLocation = process.env.SYNTHETICS_TEST_LOCATION;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import { journey, step, expect, before, after } from '@elastic/synthetics';
|
||||
import { byTestId } from '@kbn/observability-plugin/e2e/utils';
|
||||
import { syntheticsAppPageProvider } from '../../page_objects/synthetics_app';
|
||||
import { syntheticsAppPageProvider } from '../../page_objects/synthetics/synthetics_app';
|
||||
import { cleanSettings } from './services/settings';
|
||||
|
||||
journey('AlertingDefaults', async ({ page, params }) => {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { before, expect, journey, step } from '@elastic/synthetics';
|
||||
import { syntheticsAppPageProvider } from '../page_objects/synthetics_app';
|
||||
import { syntheticsAppPageProvider } from '../../page_objects/synthetics/synthetics_app';
|
||||
|
||||
journey('Test Monitor Detail Flyout', async ({ page, params }) => {
|
||||
const syntheticsApp = syntheticsAppPageProvider({ page, kibanaUrl: params.kibanaUrl });
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { journey, step, expect, before, Page } from '@elastic/synthetics';
|
||||
import { syntheticsAppPageProvider } from '../../page_objects/synthetics_app';
|
||||
import { syntheticsAppPageProvider } from '../../page_objects/synthetics/synthetics_app';
|
||||
import { cleanTestMonitors } from './services/add_monitor';
|
||||
|
||||
journey(`Getting Started Page`, async ({ page, params }: { page: Page; params: any }) => {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import { journey, step, before, after, expect } from '@elastic/synthetics';
|
||||
import { cleanTestParams } from './services/add_monitor';
|
||||
import { syntheticsAppPageProvider } from '../../page_objects/synthetics_app';
|
||||
import { syntheticsAppPageProvider } from '../../page_objects/synthetics/synthetics_app';
|
||||
|
||||
journey(`GlobalParameters`, async ({ page, params }) => {
|
||||
const syntheticsApp = syntheticsAppPageProvider({ page, kibanaUrl: params.kibanaUrl });
|
||||
|
|
|
@ -16,3 +16,4 @@ export * from './overview_search.journey';
|
|||
export * from './private_locations.journey';
|
||||
export * from './alerting_default.journey';
|
||||
export * from './global_parameters.journey';
|
||||
export * from './detail_flyout';
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
cleanTestMonitors,
|
||||
enableMonitorManagedViaApi,
|
||||
} from './services/add_monitor';
|
||||
import { syntheticsAppPageProvider } from '../../page_objects/synthetics_app';
|
||||
import { syntheticsAppPageProvider } from '../../page_objects/synthetics/synthetics_app';
|
||||
|
||||
journey(`MonitorManagementList`, async ({ page, params }) => {
|
||||
const syntheticsApp = syntheticsAppPageProvider({ page, kibanaUrl: params.kibanaUrl });
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
cleanTestMonitors,
|
||||
enableMonitorManagedViaApi,
|
||||
} from './services/add_monitor';
|
||||
import { syntheticsAppPageProvider } from '../../page_objects/synthetics_app';
|
||||
import { syntheticsAppPageProvider } from '../../page_objects/synthetics/synthetics_app';
|
||||
|
||||
journey(`MonitorSelector`, async ({ page, params }) => {
|
||||
const syntheticsApp = syntheticsAppPageProvider({ page, kibanaUrl: params.kibanaUrl });
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
cleanTestMonitors,
|
||||
enableMonitorManagedViaApi,
|
||||
} from './services/add_monitor';
|
||||
import { syntheticsAppPageProvider } from '../../page_objects/synthetics_app';
|
||||
import { syntheticsAppPageProvider } from '../../page_objects/synthetics/synthetics_app';
|
||||
|
||||
journey('Overview Scrolling', async ({ page, params }) => {
|
||||
const syntheticsApp = syntheticsAppPageProvider({ page, kibanaUrl: params.kibanaUrl });
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
cleanTestMonitors,
|
||||
enableMonitorManagedViaApi,
|
||||
} from './services/add_monitor';
|
||||
import { syntheticsAppPageProvider } from '../../page_objects/synthetics_app';
|
||||
import { syntheticsAppPageProvider } from '../../page_objects/synthetics/synthetics_app';
|
||||
|
||||
journey('Overview Search', async ({ page, params }) => {
|
||||
const syntheticsApp = syntheticsAppPageProvider({ page, kibanaUrl: params.kibanaUrl });
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
cleanTestMonitors,
|
||||
enableMonitorManagedViaApi,
|
||||
} from './services/add_monitor';
|
||||
import { syntheticsAppPageProvider } from '../../page_objects/synthetics_app';
|
||||
import { syntheticsAppPageProvider } from '../../page_objects/synthetics/synthetics_app';
|
||||
|
||||
journey('OverviewSorting', async ({ page, params }) => {
|
||||
const syntheticsApp = syntheticsAppPageProvider({ page, kibanaUrl: params.kibanaUrl });
|
||||
|
|
|
@ -14,7 +14,7 @@ import {
|
|||
cleanTestMonitors,
|
||||
getPrivateLocations,
|
||||
} from './services/add_monitor';
|
||||
import { syntheticsAppPageProvider } from '../../page_objects/synthetics_app';
|
||||
import { syntheticsAppPageProvider } from '../../page_objects/synthetics/synthetics_app';
|
||||
|
||||
journey(`PrivateLocationsSettings`, async ({ page, params }) => {
|
||||
const syntheticsApp = syntheticsAppPageProvider({ page, kibanaUrl: params.kibanaUrl });
|
||||
|
|
|
@ -19,7 +19,7 @@ import {
|
|||
byTestId,
|
||||
waitForLoadingToFinish,
|
||||
} from '@kbn/observability-plugin/e2e/utils';
|
||||
import { settingsPageProvider } from '../../page_objects/settings';
|
||||
import { settingsPageProvider } from '../../../page_objects/uptime/settings';
|
||||
|
||||
journey('DefaultEmailSettings', async ({ page, params }) => {
|
||||
const settings = settingsPageProvider({ page, kibanaUrl: params.kibanaUrl });
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import { journey, step, expect, before } from '@elastic/synthetics';
|
||||
import { assertText, byTestId, waitForLoadingToFinish } from '@kbn/observability-plugin/e2e/utils';
|
||||
import { loginPageProvider } from '../../page_objects/login';
|
||||
import { loginPageProvider } from '../../../page_objects/login';
|
||||
|
||||
journey('StatusFlyoutInAlertingApp', async ({ page, params }) => {
|
||||
const login = loginPageProvider({ page });
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import { journey, step, before } from '@elastic/synthetics';
|
||||
import { assertText, byTestId, waitForLoadingToFinish } from '@kbn/observability-plugin/e2e/utils';
|
||||
import { loginPageProvider } from '../../page_objects/login';
|
||||
import { loginPageProvider } from '../../../page_objects/login';
|
||||
|
||||
journey('TlsFlyoutInAlertingApp', async ({ page, params }) => {
|
||||
const login = loginPageProvider({ page });
|
|
@ -12,7 +12,7 @@ import {
|
|||
waitForLoadingToFinish,
|
||||
} from '@kbn/observability-plugin/e2e/utils';
|
||||
import { callKibana } from '@kbn/apm-plugin/server/test_helpers/create_apm_users/helpers/call_kibana';
|
||||
import { loginPageProvider } from '../page_objects/login';
|
||||
import { loginPageProvider } from '../../page_objects/login';
|
||||
|
||||
journey('DataViewPermissions', async ({ page, params }) => {
|
||||
const login = loginPageProvider({ page });
|
19
x-pack/plugins/synthetics/e2e/journeys/uptime/index.ts
Normal file
19
x-pack/plugins/synthetics/e2e/journeys/uptime/index.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export * from './data_view_permissions';
|
||||
export * from './read_only_user';
|
||||
export * from './alerts';
|
||||
export * from './uptime.journey';
|
||||
export * from './step_duration.journey';
|
||||
export * from './monitor_details.journey';
|
||||
export * from './monitor_name.journey';
|
||||
export * from './monitor_management.journey';
|
||||
export * from './monitor_management_enablement.journey';
|
||||
export * from './monitor_details';
|
||||
export * from './locations';
|
||||
export * from './private_locations';
|
|
@ -6,8 +6,8 @@
|
|||
*/
|
||||
|
||||
import { journey, step, before, Page } from '@elastic/synthetics';
|
||||
import { makeChecksWithStatus } from '../../helpers/make_checks';
|
||||
import { monitorDetailsPageProvider } from '../../page_objects/monitor_details';
|
||||
import { makeChecksWithStatus } from '../../../helpers/make_checks';
|
||||
import { monitorDetailsPageProvider } from '../../../page_objects/uptime/monitor_details';
|
||||
|
||||
journey('Observer location', async ({ page, params }: { page: Page; params: any }) => {
|
||||
const monitorDetails = monitorDetailsPageProvider({ page, kibanaUrl: params.kibanaUrl });
|
|
@ -13,7 +13,7 @@
|
|||
*/
|
||||
import uuid from 'uuid';
|
||||
import { journey, step, expect, after, Page } from '@elastic/synthetics';
|
||||
import { monitorManagementPageProvider } from '../page_objects/monitor_management';
|
||||
import { monitorManagementPageProvider } from '../../page_objects/uptime/monitor_management';
|
||||
|
||||
journey('MonitorDetails', async ({ page, params }: { page: Page; params: any }) => {
|
||||
const uptime = monitorManagementPageProvider({ page, kibanaUrl: params.kibanaUrl });
|
|
@ -8,7 +8,7 @@
|
|||
import { journey, step, expect, before, Page } from '@elastic/synthetics';
|
||||
import { noop } from 'lodash';
|
||||
import { byTestId, delay } from '@kbn/observability-plugin/e2e/utils';
|
||||
import { monitorDetailsPageProvider } from '../../page_objects/monitor_details';
|
||||
import { monitorDetailsPageProvider } from '../../../page_objects/uptime/monitor_details';
|
||||
|
||||
const dateRangeStart = '2019-09-10T12:40:08.078Z';
|
||||
const dateRangeEnd = '2019-09-11T19:40:08.078Z';
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import { journey, step, before, Page } from '@elastic/synthetics';
|
||||
import { byTestId } from '@kbn/observability-plugin/e2e/utils';
|
||||
import { monitorDetailsPageProvider } from '../../page_objects/monitor_details';
|
||||
import { monitorDetailsPageProvider } from '../../../page_objects/uptime/monitor_details';
|
||||
|
||||
const dateRangeStart = '2019-09-10T12:40:08.078Z';
|
||||
const dateRangeEnd = '2019-09-11T19:40:08.078Z';
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
import { journey, step, expect, before, Page } from '@elastic/synthetics';
|
||||
import { byTestId, delay } from '@kbn/observability-plugin/e2e/utils';
|
||||
import { makeChecksWithStatus } from '../../helpers/make_checks';
|
||||
import { monitorDetailsPageProvider } from '../../page_objects/monitor_details';
|
||||
import { makeChecksWithStatus } from '../../../helpers/make_checks';
|
||||
import { monitorDetailsPageProvider } from '../../../page_objects/uptime/monitor_details';
|
||||
|
||||
journey('MonitorPingRedirects', async ({ page, params }: { page: Page; params: any }) => {
|
||||
const monitorDetails = monitorDetailsPageProvider({ page, kibanaUrl: params.kibanaUrl });
|
|
@ -8,8 +8,8 @@
|
|||
import uuid from 'uuid';
|
||||
import { journey, step, expect, after, Page } from '@elastic/synthetics';
|
||||
import { byTestId } from '@kbn/observability-plugin/e2e/utils';
|
||||
import { monitorManagementPageProvider } from '../page_objects/monitor_management';
|
||||
import { DataStream } from '../../common/runtime_types/monitor_management';
|
||||
import { monitorManagementPageProvider } from '../../page_objects/uptime/monitor_management';
|
||||
import { DataStream } from '../../../common/runtime_types/monitor_management';
|
||||
|
||||
const customLocation = process.env.SYNTHETICS_TEST_LOCATION;
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
import { journey, step, expect, after, Page } from '@elastic/synthetics';
|
||||
import { monitorManagementPageProvider } from '../page_objects/monitor_management';
|
||||
import { monitorManagementPageProvider } from '../../page_objects/uptime/monitor_management';
|
||||
|
||||
journey(
|
||||
'Monitor Management-enablement-superuser',
|
|
@ -7,7 +7,7 @@
|
|||
import uuid from 'uuid';
|
||||
import { journey, step, expect, Page } from '@elastic/synthetics';
|
||||
import { byTestId } from '@kbn/observability-plugin/e2e/utils';
|
||||
import { monitorManagementPageProvider } from '../page_objects/monitor_management';
|
||||
import { monitorManagementPageProvider } from '../../page_objects/uptime/monitor_management';
|
||||
|
||||
journey(`MonitorName`, async ({ page, params }: { page: Page; params: any }) => {
|
||||
const name = `Test monitor ${uuid.v4()}`;
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
import { journey, step, expect, before } from '@elastic/synthetics';
|
||||
import { assertText, byTestId, TIMEOUT_60_SEC } from '@kbn/observability-plugin/e2e/utils';
|
||||
import { monitorManagementPageProvider } from '../../page_objects/monitor_management';
|
||||
import { monitorManagementPageProvider } from '../../../page_objects/uptime/monitor_management';
|
||||
|
||||
journey('AddPrivateLocationMonitor', async ({ page, params: { kibanaUrl } }) => {
|
||||
const uptime = monitorManagementPageProvider({ page, kibanaUrl });
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
import { journey, step, expect, before } from '@elastic/synthetics';
|
||||
import { byTestId, TIMEOUT_60_SEC } from '@kbn/observability-plugin/e2e/utils';
|
||||
import { monitorManagementPageProvider } from '../../page_objects/monitor_management';
|
||||
import { monitorManagementPageProvider } from '../../../page_objects/uptime/monitor_management';
|
||||
|
||||
journey('ManagePrivateLocation', async ({ page, params: { kibanaUrl } }) => {
|
||||
const uptime = monitorManagementPageProvider({ page, kibanaUrl });
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import { expect, journey, Page, step } from '@elastic/synthetics';
|
||||
import { byTestId } from '@kbn/observability-plugin/e2e/utils';
|
||||
import { monitorManagementPageProvider } from '../../page_objects/monitor_management';
|
||||
import { monitorManagementPageProvider } from '../../../page_objects/uptime/monitor_management';
|
||||
|
||||
journey(
|
||||
'Monitor Management read only user',
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { journey, step, expect } from '@elastic/synthetics';
|
||||
import { loginPageProvider } from '../page_objects/login';
|
||||
import { loginPageProvider } from '../../page_objects/login';
|
||||
|
||||
journey('StepsDuration', async ({ page, params }) => {
|
||||
const login = loginPageProvider({ page });
|
|
@ -5,9 +5,9 @@
|
|||
* 2.0.
|
||||
*/
|
||||
import { expect, Page } from '@elastic/synthetics';
|
||||
import { FormMonitorType } from '../../common/runtime_types/monitor_management';
|
||||
import { loginPageProvider } from './login';
|
||||
import { utilsPageProvider } from './utils';
|
||||
import { FormMonitorType } from '../../../common/runtime_types/monitor_management';
|
||||
import { loginPageProvider } from '../login';
|
||||
import { utilsPageProvider } from '../utils';
|
||||
|
||||
const SIXTY_SEC_TIMEOUT = {
|
||||
timeout: 60 * 1000,
|
|
@ -6,9 +6,9 @@
|
|||
*/
|
||||
import { expect, Page } from '@elastic/synthetics';
|
||||
import { getQuerystring, TIMEOUT_60_SEC } from '@kbn/observability-plugin/e2e/utils';
|
||||
import { DataStream } from '../../common/runtime_types/monitor_management';
|
||||
import { loginPageProvider } from './login';
|
||||
import { utilsPageProvider } from './utils';
|
||||
import { DataStream } from '../../../common/runtime_types/monitor_management';
|
||||
import { loginPageProvider } from '../login';
|
||||
import { utilsPageProvider } from '../utils';
|
||||
|
||||
export function monitorManagementPageProvider({
|
||||
page,
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
import { expect, Page } from '@elastic/synthetics';
|
||||
import { byTestId } from '@kbn/observability-plugin/e2e/utils';
|
||||
import { loginPageProvider } from './login';
|
||||
import { utilsPageProvider } from './utils';
|
||||
import { loginPageProvider } from '../login';
|
||||
import { utilsPageProvider } from '../utils';
|
||||
|
||||
export function settingsPageProvider({ page }: { page: Page; kibanaUrl: string }) {
|
||||
return {
|
Loading…
Add table
Add a link
Reference in a new issue