diff --git a/x-pack/test/functional/apps/spaces/spaces_selection.ts b/x-pack/test/functional/apps/spaces/spaces_selection.ts index 5a8e852ffb11c..45ae0863de6ab 100644 --- a/x-pack/test/functional/apps/spaces/spaces_selection.ts +++ b/x-pack/test/functional/apps/spaces/spaces_selection.ts @@ -11,7 +11,6 @@ export default function spaceSelectorFunctionalTests({ getService, getPageObjects, }: FtrProviderContext) { - const esArchiver = getService('esArchiver'); const listingTable = getService('listingTable'); const PageObjects = getPageObjects([ 'common', @@ -21,14 +20,20 @@ export default function spaceSelectorFunctionalTests({ 'security', 'spaceSelector', ]); + const spacesService = getService('spaces'); describe('Spaces', function () { + const testSpacesIds = ['another-space', ...Array.from('123456789', (idx) => `space-${idx}`)]; before(async () => { - await esArchiver.load('x-pack/test/functional/es_archives/spaces/selector'); + for (const testSpaceId of testSpacesIds) { + await spacesService.create({ id: testSpaceId, name: `${testSpaceId} name` }); + } + }); + after(async () => { + for (const testSpaceId of testSpacesIds) { + await spacesService.delete(testSpaceId); + } }); - after( - async () => await esArchiver.unload('x-pack/test/functional/es_archives/spaces/selector') - ); this.tags('includeFirefox'); describe('Space Selector', () => { @@ -82,8 +87,8 @@ export default function spaceSelectorFunctionalTests({ await PageObjects.spaceSelector.expectSearchBoxInSpacesSelector(); }); - it('search for "ce 1" and find one space', async () => { - await PageObjects.spaceSelector.setSearchBoxInSpacesSelector('ce 1'); + it('search for "ce-1 name" and find one space', async () => { + await PageObjects.spaceSelector.setSearchBoxInSpacesSelector('ce-1 name'); await PageObjects.spaceSelector.expectToFindThatManySpace(1); }); diff --git a/x-pack/test/functional/es_archives/spaces/selector/data.json b/x-pack/test/functional/es_archives/spaces/selector/data.json deleted file mode 100644 index 43fbca65865b6..0000000000000 --- a/x-pack/test/functional/es_archives/spaces/selector/data.json +++ /dev/null @@ -1,179 +0,0 @@ -{ - "type": "doc", - "value": { - "id": "config:6.0.0-alpha1", - "index": ".kibana", - "source": { - "config": { - "buildNum": 8467, - "dateFormat:tz": "UTC" - }, - "type": "config" - } - } -} - -{ - "type": "doc", - "value": { - "id": "space:default", - "index": ".kibana", - "source": { - "space": { - "description": "This is the default space!", - "name": "Default" - }, - "type": "space" - } - } -} - -{ - "type": "doc", - "value": { - "id": "space:another-space", - "index": ".kibana", - "source": { - "space": { - "description": "This is another space", - "name": "Another Space" - }, - "type": "space" - } - } -} - -{ - "type": "doc", - "value": { - "id": "space:space-1", - "index": ".kibana", - "source": { - "space": { - "description": "This is space I", - "name": "Space 1" - }, - "type": "space" - } - } -} - -{ - "type": "doc", - "value": { - "id": "space:space-2", - "index": ".kibana", - "source": { - "space": { - "description": "This is space II", - "name": "Space 2" - }, - "type": "space" - } - } -} - -{ - "type": "doc", - "value": { - "id": "space:space-3", - "index": ".kibana", - "source": { - "space": { - "description": "This is space III", - "name": "Space 3" - }, - "type": "space" - } - } -} - -{ - "type": "doc", - "value": { - "id": "space:space-4", - "index": ".kibana", - "source": { - "space": { - "description": "This is space IV", - "name": "Space 4" - }, - "type": "space" - } - } -} - -{ - "type": "doc", - "value": { - "id": "space:space-5", - "index": ".kibana", - "source": { - "space": { - "description": "This is space V", - "name": "Space 5" - }, - "type": "space" - } - } -} - -{ - "type": "doc", - "value": { - "id": "space:space-6", - "index": ".kibana", - "source": { - "space": { - "description": "This is space VI", - "name": "Space 6" - }, - "type": "space" - } - } -} - -{ - "type": "doc", - "value": { - "id": "space:space-7", - "index": ".kibana", - "source": { - "space": { - "description": "This is space VII", - "name": "Space 7" - }, - "type": "space" - } - } -} - -{ - "type": "doc", - "value": { - "id": "space:space-8", - "index": ".kibana", - "source": { - "space": { - "description": "This is space VIII", - "name": "Space 8" - }, - "type": "space" - } - } -} - -{ - "type": "doc", - "value": { - "id": "space:space-9", - "index": ".kibana", - "source": { - "space": { - "description": "This is space IX", - "name": "Space 9" - }, - "type": "space" - } - } -} diff --git a/x-pack/test/functional/es_archives/spaces/selector/mappings.json b/x-pack/test/functional/es_archives/spaces/selector/mappings.json deleted file mode 100644 index 07dc66dd8ce94..0000000000000 --- a/x-pack/test/functional/es_archives/spaces/selector/mappings.json +++ /dev/null @@ -1,245 +0,0 @@ -{ - "type": "index", - "value": { - "aliases": { - ".kibana": {} - }, - "index": ".kibana_1", - "mappings": { - "properties": { - "config": { - "dynamic": "true", - "properties": { - "buildNum": { - "type": "keyword" - }, - "dateFormat:tz": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "dashboard": { - "dynamic": "strict", - "properties": { - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "optionsJSON": { - "type": "text" - }, - "panelsJSON": { - "type": "text" - }, - "refreshInterval": { - "properties": { - "display": { - "type": "keyword" - }, - "pause": { - "type": "boolean" - }, - "section": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "timeFrom": { - "type": "keyword" - }, - "timeRestore": { - "type": "boolean" - }, - "timeTo": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "index-pattern": { - "dynamic": "strict", - "properties": { - "fieldFormatMap": { - "type": "text" - }, - "fields": { - "type": "text" - }, - "intervalName": { - "type": "keyword" - }, - "notExpandable": { - "type": "boolean" - }, - "sourceFilters": { - "type": "text" - }, - "timeFieldName": { - "type": "keyword" - }, - "title": { - "type": "text" - } - } - }, - "search": { - "dynamic": "strict", - "properties": { - "columns": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "sort": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "server": { - "dynamic": "strict", - "properties": { - "uuid": { - "type": "keyword" - } - } - }, - "space": { - "properties": { - "_reserved": { - "type": "boolean" - }, - "color": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "disabledFeatures": { - "type": "keyword" - }, - "initials": { - "type": "keyword" - }, - "name": { - "fields": { - "keyword": { - "ignore_above": 2048, - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "spaceId": { - "type": "keyword" - }, - "type": { - "type": "keyword" - }, - "url": { - "dynamic": "strict", - "properties": { - "accessCount": { - "type": "long" - }, - "accessDate": { - "type": "date" - }, - "createDate": { - "type": "date" - }, - "url": { - "fields": { - "keyword": { - "ignore_above": 2048, - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "visualization": { - "dynamic": "strict", - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "savedSearchId": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - }, - "visState": { - "type": "text" - } - } - } - } - }, - "settings": { - "index": { - "number_of_replicas": "1", - "number_of_shards": "1" - } - } - } -}