Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional changes for x-pack/test/banners_functional #136032

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions test/functional/page_objects/settings_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export class SettingsPageObject extends FtrService {
const wrapper = await this.testSubjects.find(`advancedSetting-editField-${propertyName}`);
const textarea = await wrapper.findByTagName('textarea');
await textarea.focus();
await this.common.sleep(2000);
// only way to properly replace the value of the ace editor is via the JS api
await this.browser.execute(
(editor: string, value: string) => {
Expand All @@ -130,7 +131,11 @@ export class SettingsPageObject extends FtrService {
`advancedSetting-editField-${propertyName}-editor`,
propertyValue
);
await textarea.focus();
await textarea.type(this.browser.keys.RETURN);
await this.common.sleep(20000);
await this.testSubjects.click(`advancedSetting-saveButton`);
await this.common.sleep(20000);
await this.header.waitUntilLoadingHasFinished();
}

Expand Down
52 changes: 36 additions & 16 deletions x-pack/test/banners_functional/tests/spaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import expect from '@kbn/expect';
import { FtrProviderContext } from '../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const spacesService = getService('spaces');
const kibanaServer = getService('kibanaServer');
const PageObjects = getPageObjects([
'common',
'security',
Expand All @@ -18,28 +19,47 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
'spaceSelector',
]);

describe('per-spaces banners', () => {
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/banners/multispace');
});

after(async () => {
await esArchiver.unload('x-pack/test/functional/es_archives/banners/multispace');
});

describe.only('per-spaces banners', () => {
before(async () => {
// await kibanaServer.importExport.load(
// 'x-pack/test/functional/fixtures/kbn_archiver/banners/multispace'
// );
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' }
// );
await kibanaServer.uiSettings.replace(
{
'banners:textContent': 'default space banner text',
},
{ space: 'default' }
);
await PageObjects.security.login(undefined, undefined, {
expectSpaceSelector: true,
});
await PageObjects.spaceSelector.clickSpaceCard('default');

await PageObjects.settings.navigateTo();
await PageObjects.settings.clickKibanaSettings();
// await PageObjects.settings.navigateTo();
// await PageObjects.settings.clickKibanaSettings();

await PageObjects.settings.setAdvancedSettingsTextArea(
'banners:textContent',
'default space banner text'
);
// await PageObjects.settings.setAdvancedSettingsTextArea(
// 'banners:textContent',
// 'default space banner text'
// );
});

after(async () => {
await spacesService.delete('another-space');
await kibanaServer.savedObjects.cleanStandardList();
});

it('displays the space-specific banner within the space', async () => {
Expand Down
62 changes: 0 additions & 62 deletions x-pack/test/functional/es_archives/banners/multispace/data.json

This file was deleted.

Loading