Skip to content

Commit

Permalink
[Archive Migration] x-pack..discover/feature_controls/spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
wayneseymour committed Aug 4, 2021
1 parent b03d85a commit 2e1aff3
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 552 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
]);
const testSubjects = getService('testSubjects');
const appsMenu = getService('appsMenu');
const kibanaServer = getService('kibanaServer');


async function setDiscoverTimeRange() {
await PageObjects.timePicker.setDefaultAbsoluteRange();
}

describe('spaces', () => {
describe('tre spaces', () => {
before(async () => {
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional');
});
Expand All @@ -36,9 +38,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
before(async () => {
// we need to load the following in every situation as deleting
// a space deletes all of the associated saved objects
await esArchiver.load(
'x-pack/test/functional/es_archives/discover/feature_controls/spaces'
);
await kibanaServer.importExport.load('fixtures/kbn_archiver/discover/feature_controls/spaces')
await spacesService.create({
id: 'custom_space',
name: 'custom_space',
Expand All @@ -48,9 +48,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

after(async () => {
await spacesService.delete('custom_space');
await esArchiver.unload(
'x-pack/test/functional/es_archives/discover/feature_controls/spaces'
);
await kibanaServer.importExport.unload('fixtures/kbn_archiver/discover/feature_controls/spaces')
});

it('shows discover navlink', async () => {
Expand Down Expand Up @@ -84,9 +82,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
before(async () => {
// we need to load the following in every situation as deleting
// a space deletes all of the associated saved objects
await esArchiver.load(
'x-pack/test/functional/es_archives/discover/feature_controls/spaces'
);
await kibanaServer.importExport.load('fixtures/kbn_archiver/discover/feature_controls/spaces')
await spacesService.create({
id: 'custom_space',
name: 'custom_space',
Expand All @@ -96,9 +92,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

after(async () => {
await spacesService.delete('custom_space');
await esArchiver.unload(
'x-pack/test/functional/es_archives/discover/feature_controls/spaces'
);
await kibanaServer.importExport.unload('fixtures/kbn_archiver/discover/feature_controls/spaces')
});

it(`doesn't show discover navlink`, async () => {
Expand Down
Loading

0 comments on commit 2e1aff3

Please sign in to comment.