Only check required fields for the default space (#95147)

This commit is contained in:
Larry Gregory 2021-03-23 10:45:59 -04:00 committed by GitHub
parent 12d5464852
commit 61db3f3cac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,6 +5,7 @@
* 2.0.
*/
import expect from '@kbn/expect';
import { FtrProviderContext } from '../../ftr_provider_context';
export default function ({ getService }: FtrProviderContext) {
@ -26,27 +27,32 @@ export default function ({ getService }: FtrProviderContext) {
});
it('returns the default space', async () => {
await supertest.get('/internal/spaces/_active_space').set('kbn-xsrf', 'xxx').expect(200, {
id: 'default',
name: 'Default',
description: 'This is your default space!',
color: '#00bfb3',
disabledFeatures: [],
_reserved: true,
});
await supertest
.get('/internal/spaces/_active_space')
.set('kbn-xsrf', 'xxx')
.expect(200)
.then((response) => {
const { id, name, _reserved } = response.body;
expect({ id, name, _reserved }).to.eql({
id: 'default',
name: 'Default',
_reserved: true,
});
});
});
it('returns the default space when explicitly referenced', async () => {
await supertest
.get('/s/default/internal/spaces/_active_space')
.set('kbn-xsrf', 'xxx')
.expect(200, {
id: 'default',
name: 'Default',
description: 'This is your default space!',
color: '#00bfb3',
disabledFeatures: [],
_reserved: true,
.expect(200)
.then((response) => {
const { id, name, _reserved } = response.body;
expect({ id, name, _reserved }).to.eql({
id: 'default',
name: 'Default',
_reserved: true,
});
});
});