mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
# Backport This will backport the following commits from `main` to `8.x`: - [[Spaces solution tour] Fix functional test (#198928)](https://github.com/elastic/kibana/pull/198928) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Sébastien Loix","email":"sebastien.loix@elastic.co"},"sourceCommit":{"committedDate":"2024-11-05T13:55:44Z","message":"[Spaces solution tour] Fix functional test (#198928)","sha":"83026f485cac79f93375e34310f633faa141fe9b","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Security/Spaces","release_note:skip","v9.0.0","backport:prev-minor"],"title":"[Spaces solution tour] Fix functional test","number":198928,"url":"https://github.com/elastic/kibana/pull/198928","mergeCommit":{"message":"[Spaces solution tour] Fix functional test (#198928)","sha":"83026f485cac79f93375e34310f633faa141fe9b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198928","number":198928,"mergeCommit":{"message":"[Spaces solution tour] Fix functional test (#198928)","sha":"83026f485cac79f93375e34310f633faa141fe9b"}}]}] BACKPORT--> Co-authored-by: Sébastien Loix <sebastien.loix@elastic.co>
This commit is contained in:
parent
d4d8b981ea
commit
b0fdae4344
1 changed files with 15 additions and 1 deletions
|
@ -17,10 +17,20 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
const browser = getService('browser');
|
||||
const es = getService('es');
|
||||
const log = getService('log');
|
||||
const retry = getService('retry');
|
||||
|
||||
describe('space solution tour', () => {
|
||||
let version: string | undefined;
|
||||
|
||||
const getGlobalSettings = async () => {
|
||||
const doc = await es.get(
|
||||
{ id: `config-global:${version}`, index: '.kibana' },
|
||||
{ headers: { 'kbn-xsrf': 'spaces' }, ignore: [404] }
|
||||
);
|
||||
const value = (doc?._source as any)?.['config-global'] || null;
|
||||
return value;
|
||||
};
|
||||
|
||||
const removeGlobalSettings = async () => {
|
||||
version = version ?? (await kibanaServer.version.get());
|
||||
version = version.replace(/-SNAPSHOT$/, '');
|
||||
|
@ -37,7 +47,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
throw error;
|
||||
});
|
||||
|
||||
await PageObjects.common.sleep(500); // just to be on the safe side
|
||||
await retry.tryForTime(3000, async () => {
|
||||
const value = await getGlobalSettings();
|
||||
return value === null;
|
||||
});
|
||||
};
|
||||
|
||||
before(async () => {
|
||||
|
@ -66,6 +79,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
|
||||
before(async () => {
|
||||
_defaultSpace = await spacesService.get('default');
|
||||
await removeGlobalSettings(); // Make sure we start from a clean state
|
||||
|
||||
await PageObjects.common.navigateToUrl('management', 'kibana/spaces', {
|
||||
shouldUseHashForSubUrl: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue