mirror of
https://github.com/elastic/kibana.git
synced 2025-04-21 16:29:04 -04:00
## Summary This PR is the Step 1 to enable performance journeys run for serverless projects. The focus is to re-design journeys to be compatible both for stateful & serverless Kibana. I created `KibanaPage` class to have some shared UI actions across different journeys. `ProjectPage` extends `KibanaPage` and allows us to override actions, that are different (or have different locators) in Kibana Project UI (generic project at the moment) `kibanaPage` is available in Step context and based on TEST_SERVERLESS env var appropriate class instance is used. ```typescript .step('Go to Discover Page', async ({ page, kbnUrl, kibanaPage }) => { await page.goto(kbnUrl.get(`/app/discover`)); await kibanaPage.waitForHeader(); await page.waitForSelector('[data-test-subj="discoverDocTable"][data-render-complete="true"]'); await page.waitForSelector(subj('globalLoadingIndicator-hidden')); }) ``` --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> |
||
---|---|---|
.. | ||
journey | ||
services | ||
index.ts | ||
jest.config.js | ||
kibana.jsonc | ||
package.json | ||
README.mdx | ||
tsconfig.json |
--- id: kibDevDocsOpsJourneys slug: /kibana-dev-docs/ops/journeys title: Journeys description: A new style of functional test, focused on performance testing for now tags: ['kibana', 'dev', 'contributor', 'operations', 'performance', 'functional', 'testing'] --- Journeys are a slightly newer take on Functional Tests, currently powered by [playwright](https://playwright.dev/docs). A Journey is a single pathway through Kibana and looks something like this: ```ts import { Journey } from '@kbn/journeys'; import { subj } from '@kbn/test-subj-selector'; export const journey = new Journey({ esArchives: [ ... ], kbnArchives: [ ... ], scalabilitySetup: { ... }, }) .step('Go to Discover Page', async ({ page, kbnUrl }) => { await page.goto(kbnUrl.get(`/app/discover`)); await page.waitForSelector(subj('discoverDocTable')); }) .step('Expand the first document', async ({ page }) => { const expandButtons = page.locator(subj('docTableExpandToggleColumn')); await expandButtons.first().click(); await page.locator('text="Expanded document"'); }); ```