diff --git a/packages/kbn-test/src/functional_test_runner/lib/config/schema.ts b/packages/kbn-test/src/functional_test_runner/lib/config/schema.ts index 4530b61423620..c1e43debde1ce 100644 --- a/packages/kbn-test/src/functional_test_runner/lib/config/schema.ts +++ b/packages/kbn-test/src/functional_test_runner/lib/config/schema.ts @@ -98,8 +98,6 @@ export const schema = Joi.object() try: Joi.number().default(120000), waitFor: Joi.number().default(20000), esRequestTimeout: Joi.number().default(30000), - kibanaStabilize: Joi.number().default(15000), - navigateStatusPageCheck: Joi.number().default(250), // Many of our tests use the `exists` functions to determine where the user is. For // example, you'll see a lot of code like: diff --git a/test/functional/page_objects/dashboard_page.ts b/test/functional/page_objects/dashboard_page.ts index af0a0160a81d8..90083e591fd1d 100644 --- a/test/functional/page_objects/dashboard_page.ts +++ b/test/functional/page_objects/dashboard_page.ts @@ -28,6 +28,7 @@ export function DashboardPageProvider({ getService, getPageObjects }: FtrProvide const log = getService('log'); const find = getService('find'); const retry = getService('retry'); + const config = getService('config'); const browser = getService('browser'); const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); @@ -114,7 +115,7 @@ export function DashboardPageProvider({ getService, getPageObjects }: FtrProvide public async onDashboardLandingPage() { log.debug(`onDashboardLandingPage`); return await testSubjects.exists('dashboardLandingPage', { - timeout: 5000, + timeout: config.get('timeouts.waitForExits') * 2, }); } @@ -362,7 +363,9 @@ export function DashboardPageProvider({ getService, getPageObjects }: FtrProvide await listingTable.clickItemLink('dashboard', dashboardName); await PageObjects.header.waitUntilLoadingHasFinished(); // check Dashboard landing page is not present - await testSubjects.missingOrFail('dashboardLandingPage', { timeout: 10000 }); + await testSubjects.missingOrFail('dashboardLandingPage', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); } @@ -497,7 +500,7 @@ export function DashboardPageProvider({ getService, getPageObjects }: FtrProvide for (const name of vizList) { const isPresent = await testSubjects.exists( `embeddablePanelHeading-${name.replace(/\s+/g, '')}`, - { timeout: 10000 } + { timeout: config.get('timeouts.waitForExits') * 5 } ); checkList.push({ name, isPresent }); } diff --git a/test/functional/page_objects/header_page.js b/test/functional/page_objects/header_page.js index 05edd64545a56..c2856414f7151 100644 --- a/test/functional/page_objects/header_page.js +++ b/test/functional/page_objects/header_page.js @@ -79,7 +79,9 @@ export function HeaderPageProvider({ getService, getPageObjects }) { async isGlobalLoadingIndicatorVisible() { log.debug('isGlobalLoadingIndicatorVisible'); - return await testSubjects.exists('globalLoadingIndicator', { timeout: 1500 }); + return await testSubjects.exists('globalLoadingIndicator', { + timeout: config.get('timeouts.waitForExits') * 0.6, + }); } async awaitGlobalLoadingIndicatorHidden() { diff --git a/test/functional/page_objects/home_page.ts b/test/functional/page_objects/home_page.ts index 6225b4e3aca62..44d15ace4668e 100644 --- a/test/functional/page_objects/home_page.ts +++ b/test/functional/page_objects/home_page.ts @@ -22,6 +22,7 @@ import { FtrProviderContext } from '../ftr_provider_context'; export function HomePageProvider({ getService, getPageObjects }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const retry = getService('retry'); + const config = getService('config'); const find = getService('find'); const PageObjects = getPageObjects(['common']); let isOss = true; @@ -83,7 +84,7 @@ export function HomePageProvider({ getService, getPageObjects }: FtrProviderCont await retry.try(async () => { await testSubjects.click('loadSavedObjects'); const successMsgExists = await testSubjects.exists('loadSavedObjects_success', { - timeout: 5000, + timeout: config.get('timeouts.waitForExits') * 2, }); if (!successMsgExists) { throw new Error('Failed to load saved objects'); diff --git a/test/functional/page_objects/settings_page.ts b/test/functional/page_objects/settings_page.ts index e92780143f09a..470a236038191 100644 --- a/test/functional/page_objects/settings_page.ts +++ b/test/functional/page_objects/settings_page.ts @@ -25,6 +25,7 @@ import { FtrProviderContext } from '../ftr_provider_context'; export function SettingsPageProvider({ getService, getPageObjects }: FtrProviderContext) { const log = getService('log'); const retry = getService('retry'); + const config = getService('config'); const browser = getService('browser'); const find = getService('find'); const flyout = getService('flyout'); @@ -298,12 +299,16 @@ export function SettingsPageProvider({ getService, getPageObjects }: FtrProvider } async getIndexPatternList() { - await testSubjects.existOrFail('indexPatternTable', { timeout: 5000 }); + await testSubjects.existOrFail('indexPatternTable', { + timeout: config.get('timeouts.waitForExits') * 2, + }); return await find.allByCssSelector('[data-test-subj="indexPatternTable"] .euiTable a'); } async isIndexPatternListEmpty() { - await testSubjects.existOrFail('indexPatternTable', { timeout: 5000 }); + await testSubjects.existOrFail('indexPatternTable', { + timeout: config.get('timeouts.waitForExits') * 2, + }); const indexPatternList = await this.getIndexPatternList(); return indexPatternList.length === 0; } @@ -629,23 +634,33 @@ export function SettingsPageProvider({ getService, getPageObjects }: FtrProvider } async checkImportSucceeded() { - await testSubjects.existOrFail('importSavedObjectsSuccess', { timeout: 20000 }); + await testSubjects.existOrFail('importSavedObjectsSuccess', { + timeout: config.get('timeouts.waitForExits') * 10, + }); } async checkNoneImported() { - await testSubjects.existOrFail('importSavedObjectsSuccessNoneImported', { timeout: 20000 }); + await testSubjects.existOrFail('importSavedObjectsSuccessNoneImported', { + timeout: config.get('timeouts.waitForExits') * 10, + }); } async checkImportConflictsWarning() { - await testSubjects.existOrFail('importSavedObjectsConflictsWarning', { timeout: 20000 }); + await testSubjects.existOrFail('importSavedObjectsConflictsWarning', { + timeout: config.get('timeouts.waitForExits') * 10, + }); } async checkImportLegacyWarning() { - await testSubjects.existOrFail('importSavedObjectsLegacyWarning', { timeout: 20000 }); + await testSubjects.existOrFail('importSavedObjectsLegacyWarning', { + timeout: config.get('timeouts.waitForExits') * 10, + }); } async checkImportFailedWarning() { - await testSubjects.existOrFail('importSavedObjectsFailedWarning', { timeout: 20000 }); + await testSubjects.existOrFail('importSavedObjectsFailedWarning', { + timeout: config.get('timeouts.waitForExits') * 10, + }); } async clickImportDone() { diff --git a/test/functional/page_objects/time_picker.js b/test/functional/page_objects/time_picker.js index 2394abc9c2185..b5708e5fa57dc 100644 --- a/test/functional/page_objects/time_picker.js +++ b/test/functional/page_objects/time_picker.js @@ -23,6 +23,7 @@ export function TimePickerPageProvider({ getService, getPageObjects }) { const log = getService('log'); const retry = getService('retry'); const find = getService('find'); + const config = getService('config'); const browser = getService('browser'); const testSubjects = getService('testSubjects'); const PageObjects = getPageObjects(['header', 'common']); @@ -157,7 +158,9 @@ export function TimePickerPageProvider({ getService, getPageObjects }) { async showStartEndTimes() { // This first await makes sure the superDatePicker has loaded before we check for the ShowDatesButton - await testSubjects.exists('superDatePickerToggleQuickMenuButton', { timeout: 20000 }); + await testSubjects.exists('superDatePickerToggleQuickMenuButton', { + timeout: config.get('timeouts.waitForExits') * 10, + }); const isShowDatesButton = await testSubjects.exists('superDatePickerShowDatesButton'); if (isShowDatesButton) { await testSubjects.click('superDatePickerShowDatesButton'); diff --git a/test/functional/page_objects/visual_builder_page.ts b/test/functional/page_objects/visual_builder_page.ts index ee0cafb51d455..0783f04606fbc 100644 --- a/test/functional/page_objects/visual_builder_page.ts +++ b/test/functional/page_objects/visual_builder_page.ts @@ -24,6 +24,7 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }: FtrPro const find = getService('find'); const log = getService('log'); const retry = getService('retry'); + const config = getService('config'); const testSubjects = getService('testSubjects'); const comboBox = getService('comboBox'); const PageObjects = getPageObjects(['common', 'header', 'visualize', 'timePicker', 'visChart']); @@ -54,7 +55,9 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }: FtrPro } public async checkTabIsLoaded(testSubj: string, name: string) { - const isPresent = await testSubjects.exists(testSubj, { timeout: 10000 }); + const isPresent = await testSubjects.exists(testSubj, { + timeout: config.get('timeouts.waitForExits') * 5, + }); if (!isPresent) { throw new Error(`TSVB ${name} tab is not loaded`); } @@ -503,7 +506,9 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }: FtrPro public async checkColorPickerPopUpIsPresent(): Promise { log.debug(`Check color picker popup is present`); - await testSubjects.existOrFail('tvbColorPickerPopUp', { timeout: 5000 }); + await testSubjects.existOrFail('tvbColorPickerPopUp', { + timeout: config.get('timeouts.waitForExits') * 2, + }); } public async changePanelPreview(nth: number = 0): Promise { @@ -515,7 +520,9 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }: FtrPro public async checkPreviewIsDisabled(): Promise { log.debug(`Check no data message is present`); - await testSubjects.existOrFail('noTSVBDataMessage', { timeout: 5000 }); + await testSubjects.existOrFail('noTSVBDataMessage', { + timeout: config.get('timeouts.waitForExits') * 2, + }); } public async cloneSeries(nth: number = 0): Promise { diff --git a/test/functional/page_objects/visualize_page.ts b/test/functional/page_objects/visualize_page.ts index e54e3d1d01154..cfb56e6a14a51 100644 --- a/test/functional/page_objects/visualize_page.ts +++ b/test/functional/page_objects/visualize_page.ts @@ -22,6 +22,7 @@ import { VisualizeConstants } from '../../../src/legacy/core_plugins/kibana/publ export function VisualizePageProvider({ getService, getPageObjects }: FtrProviderContext) { const testSubjects = getService('testSubjects'); + const config = getService('config'); const retry = getService('retry'); const find = getService('find'); const log = getService('log'); @@ -216,7 +217,9 @@ export function VisualizePageProvider({ getService, getPageObjects }: FtrProvide public async ensureSavePanelOpen() { log.debug('ensureSavePanelOpen'); await header.waitUntilLoadingHasFinished(); - const isOpen = await testSubjects.exists('savedObjectSaveModal', { timeout: 5000 }); + const isOpen = await testSubjects.exists('savedObjectSaveModal', { + timeout: config.get('timeouts.waitForExits') * 2, + }); if (!isOpen) { await testSubjects.click('visualizeSaveButton'); } diff --git a/test/functional/services/flyout.ts b/test/functional/services/flyout.ts index 2ee028aa24d2e..db741fb3d2f14 100644 --- a/test/functional/services/flyout.ts +++ b/test/functional/services/flyout.ts @@ -21,6 +21,7 @@ import { FtrProviderContext } from '../ftr_provider_context'; export function FlyoutProvider({ getService }: FtrProviderContext) { const testSubjects = getService('testSubjects'); + const config = getService('config'); const find = getService('find'); const log = getService('log'); const retry = getService('retry'); @@ -33,12 +34,19 @@ export function FlyoutProvider({ getService }: FtrProviderContext) { await closeBtn.click(); await retry.waitFor( 'flyout closed', - async () => !(await testSubjects.exists(dataTestSubj, { timeout: 1000 })) + async () => + !(await testSubjects.exists(dataTestSubj, { + timeout: config.get('timeouts.waitForExits') * 0.4, + })) ); } public async ensureClosed(dataTestSubj: string): Promise { - if (await testSubjects.exists(dataTestSubj, { timeout: 1000 })) { + if ( + await testSubjects.exists(dataTestSubj, { + timeout: config.get('timeouts.waitForExits') * 0.4, + }) + ) { await this.close(dataTestSubj); } } diff --git a/test/plugin_functional/test_suites/core_plugins/rendering.ts b/test/plugin_functional/test_suites/core_plugins/rendering.ts index 9679636a39d23..05c2fbb2a4e6b 100644 --- a/test/plugin_functional/test_suites/core_plugins/rendering.ts +++ b/test/plugin_functional/test_suites/core_plugins/rendering.ts @@ -36,6 +36,7 @@ declare global { export default function({ getService, getPageObjects }: PluginFunctionalProviderContext) { const PageObjects = getPageObjects(['common']); const appsMenu = getService('appsMenu'); + const config = getService('config'); const browser = getService('browser'); const find = getService('find'); const testSubjects = getService('testSubjects'); @@ -62,7 +63,8 @@ export default function({ getService, getPageObjects }: PluginFunctionalProvider return JSON.parse(document.querySelector('kbn-injected-metadata')!.getAttribute('data')!) .legacyMetadata.uiSettings.user; }); - const exists = (selector: string) => testSubjects.exists(selector, { timeout: 5000 }); + const exists = (selector: string) => + testSubjects.exists(selector, { timeout: config.get('timeouts.waitForExits') * 2 }); const findLoadingMessage = () => testSubjects.find('kbnLoadingMessage', 5000); const getRenderingSession = () => browser.execute(() => { diff --git a/x-pack/test/functional/apps/advanced_settings/feature_controls/advanced_settings_security.ts b/x-pack/test/functional/apps/advanced_settings/feature_controls/advanced_settings_security.ts index 6efaae70e089b..0768a6990635b 100644 --- a/x-pack/test/functional/apps/advanced_settings/feature_controls/advanced_settings_security.ts +++ b/x-pack/test/functional/apps/advanced_settings/feature_controls/advanced_settings_security.ts @@ -14,6 +14,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { const appsMenu = getService('appsMenu'); const testSubjects = getService('testSubjects'); const globalNav = getService('globalNav'); + const config = getService('config'); describe('security feature controls', () => { before(async () => { @@ -184,7 +185,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { shouldLoginIfPrompted: false, }); await testSubjects.existOrFail('managementHome', { - timeout: 10000, + timeout: config.get('timeouts.waitForExits') * 5, }); }); }); diff --git a/x-pack/test/functional/apps/apm/feature_controls/apm_security.ts b/x-pack/test/functional/apps/apm/feature_controls/apm_security.ts index 7c9c9f9c8c155..2728b68e4aa85 100644 --- a/x-pack/test/functional/apps/apm/feature_controls/apm_security.ts +++ b/x-pack/test/functional/apps/apm/feature_controls/apm_security.ts @@ -9,6 +9,7 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; export default function({ getPageObjects, getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const security = getService('security'); + const config = getService('config'); const PageObjects = getPageObjects(['common', 'error', 'security']); const testSubjects = getService('testSubjects'); const appsMenu = getService('appsMenu'); @@ -66,7 +67,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { it('can navigate to APM app', async () => { await PageObjects.common.navigateToApp('apm'); await testSubjects.existOrFail('apmMainContainer', { - timeout: 10000, + timeout: config.get('timeouts.waitForExits') * 5, }); }); @@ -115,7 +116,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { it('can navigate to APM app', async () => { await PageObjects.common.navigateToApp('apm'); await testSubjects.existOrFail('apmMainContainer', { - timeout: 10000, + timeout: config.get('timeouts.waitForExits') * 5, }); }); diff --git a/x-pack/test/functional/apps/apm/feature_controls/apm_spaces.ts b/x-pack/test/functional/apps/apm/feature_controls/apm_spaces.ts index 474240b201fac..abd35f04ac57d 100644 --- a/x-pack/test/functional/apps/apm/feature_controls/apm_spaces.ts +++ b/x-pack/test/functional/apps/apm/feature_controls/apm_spaces.ts @@ -8,6 +8,7 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; export default function({ getPageObjects, getService }: FtrProviderContext) { const spacesService = getService('spaces'); + const config = getService('config'); const PageObjects = getPageObjects(['common', 'error', 'timePicker', 'security', 'settings']); const testSubjects = getService('testSubjects'); const appsMenu = getService('appsMenu'); @@ -38,7 +39,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { it('can navigate to Uptime app', async () => { await PageObjects.common.navigateToApp('apm'); await testSubjects.existOrFail('apmMainContainer', { - timeout: 10000, + timeout: config.get('timeouts.waitForExits') * 5, }); }); }); diff --git a/x-pack/test/functional/apps/dashboard/feature_controls/dashboard_security.ts b/x-pack/test/functional/apps/dashboard/feature_controls/dashboard_security.ts index 6a6e2f23785e3..649920d9f67be 100644 --- a/x-pack/test/functional/apps/dashboard/feature_controls/dashboard_security.ts +++ b/x-pack/test/functional/apps/dashboard/feature_controls/dashboard_security.ts @@ -13,6 +13,7 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; export default function({ getPageObjects, getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const security = getService('security'); + const config = getService('config'); const PageObjects = getPageObjects(['common', 'dashboard', 'security', 'spaceSelector', 'share']); const appsMenu = getService('appsMenu'); const panelActions = getService('dashboardPanelActions'); @@ -87,7 +88,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { shouldLoginIfPrompted: false, } ); - await testSubjects.existOrFail('dashboardLandingPage', { timeout: 10000 }); + await testSubjects.existOrFail('dashboardLandingPage', { + timeout: config.get('timeouts.waitForExits') * 5, + }); await testSubjects.existOrFail('newItemButton'); }); @@ -104,7 +107,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { shouldLoginIfPrompted: false, } ); - await testSubjects.existOrFail('emptyDashboardWidget', { timeout: 10000 }); + await testSubjects.existOrFail('emptyDashboardWidget', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); it(`can view existing Dashboard`, async () => { @@ -112,7 +117,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { ensureCurrentUrl: false, shouldLoginIfPrompted: false, }); - await testSubjects.existOrFail('embeddablePanelHeading-APie', { timeout: 10000 }); + await testSubjects.existOrFail('embeddablePanelHeading-APie', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); it(`does not allow a visualization to be edited`, async () => { @@ -265,7 +272,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { shouldLoginIfPrompted: false, } ); - await testSubjects.existOrFail('dashboardLandingPage', { timeout: 10000 }); + await testSubjects.existOrFail('dashboardLandingPage', { + timeout: config.get('timeouts.waitForExits') * 5, + }); await testSubjects.missingOrFail('newItemButton'); }); @@ -290,7 +299,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { ensureCurrentUrl: false, shouldLoginIfPrompted: false, }); - await testSubjects.existOrFail('embeddablePanelHeading-APie', { timeout: 10000 }); + await testSubjects.existOrFail('embeddablePanelHeading-APie', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); it(`Permalinks doesn't show create short-url button`, async () => { @@ -376,7 +387,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { shouldLoginIfPrompted: false, } ); - await testSubjects.existOrFail('homeApp', { timeout: 10000 }); + await testSubjects.existOrFail('homeApp', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); it(`create new dashboard redirects to the home page`, async () => { @@ -400,7 +413,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { shouldLoginIfPrompted: false, } ); - await testSubjects.existOrFail('homeApp', { timeout: 10000 }); + await testSubjects.existOrFail('homeApp', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); it(`edit dashboard for object which exists redirects to the home page`, async () => { @@ -408,7 +423,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { ensureCurrentUrl: false, shouldLoginIfPrompted: false, }); - await testSubjects.existOrFail('homeApp', { timeout: 10000 }); + await testSubjects.existOrFail('homeApp', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); }); }); diff --git a/x-pack/test/functional/apps/dashboard/feature_controls/dashboard_spaces.ts b/x-pack/test/functional/apps/dashboard/feature_controls/dashboard_spaces.ts index 002ae627c488d..e9f57d7af4fa7 100644 --- a/x-pack/test/functional/apps/dashboard/feature_controls/dashboard_spaces.ts +++ b/x-pack/test/functional/apps/dashboard/feature_controls/dashboard_spaces.ts @@ -13,6 +13,7 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; export default function({ getPageObjects, getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const spacesService = getService('spaces'); + const config = getService('config'); const PageObjects = getPageObjects([ 'common', 'dashboard', @@ -64,7 +65,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { shouldLoginIfPrompted: false, } ); - await testSubjects.existOrFail('dashboardLandingPage', { timeout: 10000 }); + await testSubjects.existOrFail('dashboardLandingPage', { + timeout: config.get('timeouts.waitForExits') * 5, + }); await testSubjects.existOrFail('newItemButton'); }); @@ -78,7 +81,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { shouldLoginIfPrompted: false, } ); - await testSubjects.existOrFail('emptyDashboardWidget', { timeout: 10000 }); + await testSubjects.existOrFail('emptyDashboardWidget', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); it(`can view existing Dashboard`, async () => { @@ -87,7 +92,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { ensureCurrentUrl: false, shouldLoginIfPrompted: false, }); - await testSubjects.existOrFail('embeddablePanelHeading-APie', { timeout: 10000 }); + await testSubjects.existOrFail('embeddablePanelHeading-APie', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); }); @@ -126,7 +133,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { shouldLoginIfPrompted: false, } ); - await testSubjects.existOrFail('homeApp', { timeout: 10000 }); + await testSubjects.existOrFail('homeApp', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); it(`edit dashboard for object which doesn't exist redirects to the home page`, async () => { @@ -139,7 +148,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { shouldLoginIfPrompted: false, } ); - await testSubjects.existOrFail('homeApp', { timeout: 10000 }); + await testSubjects.existOrFail('homeApp', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); it(`edit dashboard for object which exists redirects to the home page`, async () => { @@ -148,7 +159,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { ensureCurrentUrl: false, shouldLoginIfPrompted: false, }); - await testSubjects.existOrFail('homeApp', { timeout: 10000 }); + await testSubjects.existOrFail('homeApp', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); }); }); diff --git a/x-pack/test/functional/apps/dev_tools/feature_controls/dev_tools_security.ts b/x-pack/test/functional/apps/dev_tools/feature_controls/dev_tools_security.ts index 9db9a913e9a4b..ce140037669ab 100644 --- a/x-pack/test/functional/apps/dev_tools/feature_controls/dev_tools_security.ts +++ b/x-pack/test/functional/apps/dev_tools/feature_controls/dev_tools_security.ts @@ -12,6 +12,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { const PageObjects = getPageObjects(['common', 'console', 'security']); const appsMenu = getService('appsMenu'); const testSubjects = getService('testSubjects'); + const config = getService('config'); const grokDebugger = getService('grokDebugger'); const globalNav = getService('globalNav'); @@ -232,21 +233,27 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { await PageObjects.common.navigateToUrl('console', '', { ensureCurrentUrl: false, }); - await testSubjects.existOrFail('homeApp', { timeout: 10000 }); + await testSubjects.existOrFail('homeApp', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); it(`navigating to search profiler redirect to homepage`, async () => { await PageObjects.common.navigateToUrl('searchProfiler', '', { ensureCurrentUrl: false, }); - await testSubjects.existOrFail('homeApp', { timeout: 10000 }); + await testSubjects.existOrFail('homeApp', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); it(`navigating to grok debugger redirect to homepage`, async () => { await PageObjects.common.navigateToUrl('grokDebugger', '', { ensureCurrentUrl: false, }); - await testSubjects.existOrFail('homeApp', { timeout: 10000 }); + await testSubjects.existOrFail('homeApp', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); }); }); diff --git a/x-pack/test/functional/apps/dev_tools/feature_controls/dev_tools_spaces.ts b/x-pack/test/functional/apps/dev_tools/feature_controls/dev_tools_spaces.ts index f917792eea027..0a345f4acc61f 100644 --- a/x-pack/test/functional/apps/dev_tools/feature_controls/dev_tools_spaces.ts +++ b/x-pack/test/functional/apps/dev_tools/feature_controls/dev_tools_spaces.ts @@ -9,6 +9,7 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; export default function({ getPageObjects, getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const spacesService = getService('spaces'); + const config = getService('config'); const PageObjects = getPageObjects([ 'common', 'dashboard', @@ -92,21 +93,27 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { await PageObjects.common.navigateToUrl('console', '', { ensureCurrentUrl: false, }); - await testSubjects.existOrFail('homeApp', { timeout: 10000 }); + await testSubjects.existOrFail('homeApp', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); it(`navigating to search profiler redirect to homepage`, async () => { await PageObjects.common.navigateToUrl('searchProfiler', '', { ensureCurrentUrl: false, }); - await testSubjects.existOrFail('homeApp', { timeout: 10000 }); + await testSubjects.existOrFail('homeApp', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); it(`navigating to grok debugger redirect to homepage`, async () => { await PageObjects.common.navigateToUrl('grokDebugger', '', { ensureCurrentUrl: false, }); - await testSubjects.existOrFail('homeApp', { timeout: 10000 }); + await testSubjects.existOrFail('homeApp', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); }); }); diff --git a/x-pack/test/functional/apps/discover/feature_controls/discover_security.ts b/x-pack/test/functional/apps/discover/feature_controls/discover_security.ts index 1796858165a2b..cfc8acbcf9d13 100644 --- a/x-pack/test/functional/apps/discover/feature_controls/discover_security.ts +++ b/x-pack/test/functional/apps/discover/feature_controls/discover_security.ts @@ -10,6 +10,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const security = getService('security'); const globalNav = getService('globalNav'); + const config = getService('config'); const PageObjects = getPageObjects([ 'common', 'discover', @@ -173,7 +174,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { it(`doesn't show save button`, async () => { await PageObjects.common.navigateToApp('discover'); - await testSubjects.existOrFail('discoverNewButton', { timeout: 10000 }); + await testSubjects.existOrFail('discoverNewButton', { + timeout: config.get('timeouts.waitForExits') * 5, + }); await testSubjects.missingOrFail('discoverSaveButton'); }); @@ -304,7 +307,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { await PageObjects.common.navigateToUrl('discover', '', { ensureCurrentUrl: false, }); - await testSubjects.existOrFail('homeApp', { timeout: 10000 }); + await testSubjects.existOrFail('homeApp', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); }); }); diff --git a/x-pack/test/functional/apps/discover/feature_controls/discover_spaces.ts b/x-pack/test/functional/apps/discover/feature_controls/discover_spaces.ts index c38dda536f253..556441b90c5a3 100644 --- a/x-pack/test/functional/apps/discover/feature_controls/discover_spaces.ts +++ b/x-pack/test/functional/apps/discover/feature_controls/discover_spaces.ts @@ -9,6 +9,7 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; export default function({ getPageObjects, getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const spacesService = getService('spaces'); + const config = getService('config'); const PageObjects = getPageObjects([ 'common', 'discover', @@ -59,7 +60,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { await PageObjects.common.navigateToApp('discover', { basePath: '/s/custom_space', }); - await testSubjects.existOrFail('discoverSaveButton', { timeout: 10000 }); + await testSubjects.existOrFail('discoverSaveButton', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); it('shows "visualize" field button', async () => { @@ -156,7 +159,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { basePath: '/s/custom_space', ensureCurrentUrl: false, }); - await testSubjects.existOrFail('homeApp', { timeout: 10000 }); + await testSubjects.existOrFail('homeApp', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); }); }); diff --git a/x-pack/test/functional/apps/graph/feature_controls/graph_security.ts b/x-pack/test/functional/apps/graph/feature_controls/graph_security.ts index 37de93a0a7e91..6ce3fd051089f 100644 --- a/x-pack/test/functional/apps/graph/feature_controls/graph_security.ts +++ b/x-pack/test/functional/apps/graph/feature_controls/graph_security.ts @@ -13,6 +13,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const appsMenu = getService('appsMenu'); const globalNav = getService('globalNav'); + const config = getService('config'); describe('security', () => { before(async () => { @@ -69,7 +70,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { it('landing page shows "Create new graph" button', async () => { await PageObjects.common.navigateToApp('graph'); - await testSubjects.existOrFail('graphLandingPage', { timeout: 10000 }); + await testSubjects.existOrFail('graphLandingPage', { + timeout: config.get('timeouts.waitForExits') * 5, + }); await testSubjects.existOrFail('graphCreateGraphPromptButton'); }); @@ -132,7 +135,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { it('does not show a "Create new Workspace" button', async () => { await PageObjects.common.navigateToApp('graph'); - await testSubjects.existOrFail('graphLandingPage', { timeout: 10000 }); + await testSubjects.existOrFail('graphLandingPage', { + timeout: config.get('timeouts.waitForExits') * 5, + }); await testSubjects.missingOrFail('newItemButton'); }); diff --git a/x-pack/test/functional/apps/graph/feature_controls/graph_spaces.ts b/x-pack/test/functional/apps/graph/feature_controls/graph_spaces.ts index d0d0232b5a8b1..f5356eeca3db6 100644 --- a/x-pack/test/functional/apps/graph/feature_controls/graph_spaces.ts +++ b/x-pack/test/functional/apps/graph/feature_controls/graph_spaces.ts @@ -11,6 +11,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { const spacesService = getService('spaces'); const PageObjects = getPageObjects(['common', 'graph', 'security', 'error', 'settings']); const testSubjects = getService('testSubjects'); + const config = getService('config'); const appsMenu = getService('appsMenu'); describe('spaces', () => { @@ -43,7 +44,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { await PageObjects.common.navigateToApp('graph', { basePath: '/s/custom_space', }); - await testSubjects.existOrFail('graphLandingPage', { timeout: 10000 }); + await testSubjects.existOrFail('graphLandingPage', { + timeout: config.get('timeouts.waitForExits') * 5, + }); await testSubjects.existOrFail('graphCreateGraphPromptButton'); }); diff --git a/x-pack/test/functional/apps/index_patterns/feature_controls/index_patterns_security.ts b/x-pack/test/functional/apps/index_patterns/feature_controls/index_patterns_security.ts index ed25816e68712..7b56b680d2981 100644 --- a/x-pack/test/functional/apps/index_patterns/feature_controls/index_patterns_security.ts +++ b/x-pack/test/functional/apps/index_patterns/feature_controls/index_patterns_security.ts @@ -14,6 +14,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { const appsMenu = getService('appsMenu'); const testSubjects = getService('testSubjects'); const globalNav = getService('globalNav'); + const config = getService('config'); describe('security', () => { before(async () => { @@ -190,7 +191,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { ensureCurrentUrl: false, shouldLoginIfPrompted: false, }); - await testSubjects.existOrFail('homeApp', { timeout: 10000 }); + await testSubjects.existOrFail('homeApp', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); }); }); diff --git a/x-pack/test/functional/apps/index_patterns/feature_controls/index_patterns_spaces.ts b/x-pack/test/functional/apps/index_patterns/feature_controls/index_patterns_spaces.ts index 75020d6eab7e4..45e12e9acac4e 100644 --- a/x-pack/test/functional/apps/index_patterns/feature_controls/index_patterns_spaces.ts +++ b/x-pack/test/functional/apps/index_patterns/feature_controls/index_patterns_spaces.ts @@ -12,6 +12,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { const PageObjects = getPageObjects(['common', 'settings', 'security']); const testSubjects = getService('testSubjects'); const appsMenu = getService('appsMenu'); + const config = getService('config'); describe('spaces', () => { before(async () => { @@ -75,7 +76,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { ensureCurrentUrl: false, shouldLoginIfPrompted: false, }); - await testSubjects.existOrFail('homeApp', { timeout: 10000 }); + await testSubjects.existOrFail('homeApp', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); }); }); diff --git a/x-pack/test/functional/apps/uptime/feature_controls/uptime_security.ts b/x-pack/test/functional/apps/uptime/feature_controls/uptime_security.ts index 4ff82484db91c..c825360a901a4 100644 --- a/x-pack/test/functional/apps/uptime/feature_controls/uptime_security.ts +++ b/x-pack/test/functional/apps/uptime/feature_controls/uptime_security.ts @@ -13,6 +13,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const appsMenu = getService('appsMenu'); const globalNav = getService('globalNav'); + const config = getService('config'); describe('security', () => { before(async () => { @@ -69,7 +70,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { it('can navigate to Uptime app', async () => { await PageObjects.common.navigateToApp('uptime'); - await testSubjects.existOrFail('uptimeApp', { timeout: 10000 }); + await testSubjects.existOrFail('uptimeApp', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); it(`doesn't show read-only badge`, async () => { @@ -120,7 +123,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { it('can navigate to Uptime app', async () => { await PageObjects.common.navigateToApp('uptime'); - await testSubjects.existOrFail('uptimeApp', { timeout: 10000 }); + await testSubjects.existOrFail('uptimeApp', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); it(`shows read-only badge`, async () => { diff --git a/x-pack/test/functional/apps/uptime/feature_controls/uptime_spaces.ts b/x-pack/test/functional/apps/uptime/feature_controls/uptime_spaces.ts index c3dcb1b27771f..181c8246241d6 100644 --- a/x-pack/test/functional/apps/uptime/feature_controls/uptime_spaces.ts +++ b/x-pack/test/functional/apps/uptime/feature_controls/uptime_spaces.ts @@ -11,6 +11,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { const PageObjects = getPageObjects(['common', 'error', 'timePicker', 'security', 'settings']); const testSubjects = getService('testSubjects'); const appsMenu = getService('appsMenu'); + const config = getService('config'); describe('spaces', () => { describe('space with no features disabled', () => { @@ -37,7 +38,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { it('can navigate to Uptime app', async () => { await PageObjects.common.navigateToApp('uptime'); - await testSubjects.existOrFail('uptimeApp', { timeout: 10000 }); + await testSubjects.existOrFail('uptimeApp', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); }); diff --git a/x-pack/test/functional/apps/visualize/feature_controls/visualize_security.ts b/x-pack/test/functional/apps/visualize/feature_controls/visualize_security.ts index bdcdc4b7cd3ec..43cc21d708cba 100644 --- a/x-pack/test/functional/apps/visualize/feature_controls/visualize_security.ts +++ b/x-pack/test/functional/apps/visualize/feature_controls/visualize_security.ts @@ -9,6 +9,7 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; export default function({ getPageObjects, getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const security = getService('security'); + const config = getService('config'); const PageObjects = getPageObjects([ 'common', 'visualize', @@ -80,7 +81,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { it(`landing page shows "Create new Visualization" button`, async () => { await PageObjects.visualize.gotoVisualizationLandingPage(); - await testSubjects.existOrFail('visualizeLandingPage', { timeout: 10000 }); + await testSubjects.existOrFail('visualizeLandingPage', { + timeout: config.get('timeouts.waitForExits') * 5, + }); await testSubjects.existOrFail('newItemButton'); }); @@ -93,7 +96,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { ensureCurrentUrl: false, shouldLoginIfPrompted: false, }); - await testSubjects.existOrFail('visualizationLoader', { timeout: 10000 }); + await testSubjects.existOrFail('visualizationLoader', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); it('can save existing Visualization', async () => { @@ -101,7 +106,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { ensureCurrentUrl: false, shouldLoginIfPrompted: false, }); - await testSubjects.existOrFail('visualizeSaveButton', { timeout: 10000 }); + await testSubjects.existOrFail('visualizeSaveButton', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); it('Embed code shows create short-url button', async () => { @@ -198,7 +205,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { it(`landing page shows "Create new Visualization" button`, async () => { await PageObjects.visualize.gotoVisualizationLandingPage(); - await testSubjects.existOrFail('visualizeLandingPage', { timeout: 10000 }); + await testSubjects.existOrFail('visualizeLandingPage', { + timeout: config.get('timeouts.waitForExits') * 5, + }); await testSubjects.existOrFail('newItemButton'); }); @@ -211,7 +220,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { ensureCurrentUrl: false, shouldLoginIfPrompted: false, }); - await testSubjects.existOrFail('visualizationLoader', { timeout: 10000 }); + await testSubjects.existOrFail('visualizationLoader', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); it(`can't save existing Visualization`, async () => { @@ -219,8 +230,12 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { ensureCurrentUrl: false, shouldLoginIfPrompted: false, }); - await testSubjects.existOrFail('shareTopNavButton', { timeout: 10000 }); - await testSubjects.missingOrFail('visualizeSaveButton', { timeout: 10000 }); + await testSubjects.existOrFail('shareTopNavButton', { + timeout: config.get('timeouts.waitForExits') * 5, + }); + await testSubjects.missingOrFail('visualizeSaveButton', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); it(`Embed Code doesn't show create short-url button`, async () => { @@ -304,7 +319,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { ensureCurrentUrl: false, shouldLoginIfPrompted: false, }); - await testSubjects.existOrFail('homeApp', { timeout: 10000 }); + await testSubjects.existOrFail('homeApp', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); it(`edit page redirects to home page`, async () => { @@ -312,7 +329,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { ensureCurrentUrl: false, shouldLoginIfPrompted: false, }); - await testSubjects.existOrFail('homeApp', { timeout: 10000 }); + await testSubjects.existOrFail('homeApp', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); }); }); diff --git a/x-pack/test/functional/apps/visualize/feature_controls/visualize_spaces.ts b/x-pack/test/functional/apps/visualize/feature_controls/visualize_spaces.ts index 066042896c122..a500aa61178c6 100644 --- a/x-pack/test/functional/apps/visualize/feature_controls/visualize_spaces.ts +++ b/x-pack/test/functional/apps/visualize/feature_controls/visualize_spaces.ts @@ -8,6 +8,7 @@ import { VisualizeConstants } from '../../../../../../src/legacy/core_plugins/ki import { FtrProviderContext } from '../../../ftr_provider_context'; export default function({ getPageObjects, getService }: FtrProviderContext) { + const config = getService('config'); const esArchiver = getService('esArchiver'); const spacesService = getService('spaces'); const PageObjects = getPageObjects([ @@ -61,7 +62,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { shouldLoginIfPrompted: false, } ); - await testSubjects.existOrFail('visualizationLoader', { timeout: 10000 }); + await testSubjects.existOrFail('visualizationLoader', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); }); @@ -96,7 +99,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { ensureCurrentUrl: false, shouldLoginIfPrompted: false, }); - await testSubjects.existOrFail('homeApp', { timeout: 10000 }); + await testSubjects.existOrFail('homeApp', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); it(`edit visualization for object which doesn't exist redirects to the home page`, async () => { @@ -109,7 +114,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { shouldLoginIfPrompted: false, } ); - await testSubjects.existOrFail('homeApp', { timeout: 10000 }); + await testSubjects.existOrFail('homeApp', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); it(`edit visualization for object which exists redirects to the home page`, async () => { @@ -122,7 +129,9 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { shouldLoginIfPrompted: false, } ); - await testSubjects.existOrFail('homeApp', { timeout: 10000 }); + await testSubjects.existOrFail('homeApp', { + timeout: config.get('timeouts.waitForExits') * 5, + }); }); }); });