kibana/packages/shared-ux/page
Robert Oskamp 87be4cb678
Initial e2e tests for serverless plugins (#157166)
## Summary

This PR adds boilerplate code and a few initial end-to-end tests to
serverless plugins.

Note that the tests defined in this PR are not part of any CI run yet,
this will be done in a follow-up after this PR is merged.

### Details

The serverless test structure corresponds to what we have in
`x-pack/test` with API tests in `api_integration` and UI tests in
`functional`, each with their set of helper methods and sub-directories
for
- `common` functionality shared across serverless projects (core, shared
UX, ...)
- `observability` project specific functionality
- `search` project specific functionality
- `security` project specific functionality

The `shared` directory contains fixtures, services, ... that are shared
across `api_integration` abd `functional` tests.

```
x-pack/test_serverless/
├─ api_integration
│  ├─ services
│  ├─ test_suites
│  │  ├─ common
│  │  ├─ observability
│  │  ├─ search
│  │  ├─ security
├─ functional
│  ├─ page_objects
│  ├─ services
│  ├─ test_suites
│  │  ├─ common
│  │  ├─ observability
│  │  ├─ search
│  │  ├─ security
├─ shared
│  ├─ services
│  ├─ types
```

See also `x-pack/test_serverless/README.md`

### Run tests

Similar to how functional tests are run in `x-pack/test`, you can point
the functional tests server and test runner to config files in this
`x-pack/test_serverless` directory, e.g. from the `x-pack` directory
run:
```
node scripts/functional_tests_server.js --config test_serverless/api_integration/test_suites/common/config.ts
```
and 
```
node scripts/functional_test_runner.js --config test_serverless/api_integration/test_suites/common/config.ts
```

### Additional changes

- The stateful `common_page` page object used the existence of the
global nav to determine `isChromeVisible` and `isChromeHidden`, which is
not working when the global nav is disabled. To solve this, a
`data-test-subj` that indicates the chrome visible state is added to the
Kibana app wrapper and is used for the checks.
- Add a few `data-test-subj` entries to the Observability overview page.
- Add optional `dataTestSubj` to the `Navigation` component and use that
for the serverless search nav.
- Add optional `titleDataTestSubj` to the `SolutionNav` component and
use it for the serverless security nav.
- Add a data-test-subj entry to the Search overview page.
2023-05-22 12:57:38 +02:00
..
analytics_no_data [Custom Branding] Replace EuiLoadingElastic with EuiLoadingSpinner (#149253) 2023-01-31 11:54:42 -07:00
kibana_no_data [Custom Branding] Replace EuiLoadingElastic with EuiLoadingSpinner (#149253) 2023-01-31 11:54:42 -07:00
kibana_template Upgrade EUI to v79.0.1 (#156925) 2023-05-15 16:09:31 -05:00
no_data [codeowners] rename global experience to @elastic/appex-sharedux 2023-01-18 10:02:49 -07:00
no_data_config [codeowners] rename global experience to @elastic/appex-sharedux 2023-01-18 10:02:49 -07:00
solution_nav Initial e2e tests for serverless plugins (#157166) 2023-05-22 12:57:38 +02:00