Only check required fields for the default space (#95147)
This commit is contained in:
parent
12d5464852
commit
61db3f3cac
|
@ -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,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue