Skip to content

Commit

Permalink
[Archive Migration] x-pack spaces/enter_space (elastic#135200)
Browse files Browse the repository at this point in the history
* [Archive Migration] x-pack spaces/enter_space

* Replace the archive definitions with code.

* Add the malformed url to the kbn archive, thanks to a tip from
Oleg Zasypkin.

* Drop exclusive.

* Use Oleg's suggestion.

* Whoops.
  • Loading branch information
wayneseymour authored Jul 12, 2022
1 parent cd1e67c commit 97c0588
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 337 deletions.
35 changes: 29 additions & 6 deletions x-pack/test/functional/apps/spaces/enter_space.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,45 @@

import { FtrProviderContext } from '../../ftr_provider_context';

export default function enterSpaceFunctonalTests({
export default function enterSpaceFunctionalTests({
getService,
getPageObjects,
}: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const PageObjects = getPageObjects(['security', 'spaceSelector']);
const spacesService = getService('spaces');

describe('Enter Space', function () {
this.tags('includeFirefox');
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/spaces/enter_space');
await spacesService.create({
id: 'another-space',
name: 'Another Space',
disabledFeatures: [],
});
await kibanaServer.uiSettings.replace(
{
defaultRoute: '/app/canvas',
buildNum: 8467,
'dateFormat:tz': 'UTC',
},
{ space: 'another-space' }
);
const config = await kibanaServer.savedObjects.get({
id: await kibanaServer.version.get(),
type: 'config',
});
await kibanaServer.savedObjects.update({
id: config.id,
type: config.type,
attributes: { defaultRoute: 'http://example.com/evil' },
});
await PageObjects.security.forceLogout();
});
after(
async () => await esArchiver.unload('x-pack/test/functional/es_archives/spaces/enter_space')
);
after(async () => {
await spacesService.delete('another-space');
await kibanaServer.savedObjects.cleanStandardList();
});

afterEach(async () => {
// NOTE: Logout needs to happen before anything else to avoid flaky behavior
Expand Down
83 changes: 0 additions & 83 deletions x-pack/test/functional/es_archives/spaces/enter_space/data.json

This file was deleted.

Loading

0 comments on commit 97c0588

Please sign in to comment.