Skip to content

Commit b4d93fc

Browse files
authored
[Security Solution] Update cypress doc with experimental flags (#175889)
## Summary Update the cypress README doc with experimental flags info.
1 parent ca23dd5 commit b4d93fc

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

  • x-pack/test/security_solution_cypress/cypress

x-pack/test/security_solution_cypress/cypress/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ If you are still having doubts, questions or queries, please feel free to ping o
1515

1616
[**Running the tests**](#running-the-tests)
1717

18+
[**Enabling Experimental Flags**](#enabling-experimental-flags)
19+
1820
[**Debugging your test**](#debugging-your-test)
1921

2022
[**Folder structure**](#folder-structure)
@@ -94,6 +96,29 @@ Run the tests with the following yarn scripts from `x-pack/test/security_solutio
9496

9597
Please note that all the headless mode commands do not open the Cypress UI and are typically used in CI/CD environments. The scripts that open the Cypress UI are useful for development and debugging.
9698

99+
### Enabling experimental flags
100+
101+
When writing a test that requires an experimental flag enabled, you need to pass an extra configuration to the header of the test:
102+
103+
```typescript
104+
describe(
105+
'My Experimental Flag test',
106+
{
107+
env: {
108+
ftrConfig: {
109+
kbnServerArgs: [
110+
`--xpack.securitySolution.enableExperimental=${JSON.stringify([
111+
'MY_EXPERIMENTAL_FLAG',
112+
])}`,
113+
],
114+
},
115+
},
116+
},
117+
...
118+
```
119+
120+
Note that this configuration doesn't work for local development. In this case, you need to update the configuration files: `../config` and `../serverless_config`, but you shouldn't commit these changes.
121+
97122
## Debugging your test
98123
99124
In order to be able to debug any Cypress test you need to open Cypress on visual mode. [Here](https://docs.cypress.io/guides/guides/debugging)

0 commit comments

Comments
 (0)