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

Lens on Dashboard 7.12.1 Smoke Tests #102667

Merged
Merged
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
60 changes: 32 additions & 28 deletions test/functional/services/dashboard/panel_actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,36 +211,29 @@ export class DashboardPanelActionsService extends FtrService {
await this.testSubjects.click('confirmSaveSavedObjectButton');
}

async expectExistsRemovePanelAction() {
this.log.debug('expectExistsRemovePanelAction');
await this.expectExistsPanelAction(REMOVE_PANEL_DATA_TEST_SUBJ);
}

async expectExistsPanelAction(testSubject: string) {
async expectExistsPanelAction(testSubject: string, title?: string) {
this.log.debug('expectExistsPanelAction', testSubject);
await this.openContextMenu();
if (await this.testSubjects.exists(CLONE_PANEL_DATA_TEST_SUBJ)) return;
if (await this.hasContextMenuMoreItem()) {
await this.clickContextMenuMoreItem();

const panelWrapper = title ? await this.getPanelHeading(title) : undefined;
await this.openContextMenu(panelWrapper);

if (!(await this.testSubjects.exists(testSubject))) {
if (await this.hasContextMenuMoreItem()) {
await this.clickContextMenuMoreItem();
}
await this.testSubjects.existOrFail(testSubject);
}
await this.testSubjects.existOrFail(CLONE_PANEL_DATA_TEST_SUBJ);
await this.toggleContextMenu();
await this.toggleContextMenu(panelWrapper);
}

async expectMissingPanelAction(testSubject: string) {
this.log.debug('expectMissingPanelAction', testSubject);
await this.openContextMenu();
await this.testSubjects.missingOrFail(testSubject);
if (await this.hasContextMenuMoreItem()) {
await this.clickContextMenuMoreItem();
await this.testSubjects.missingOrFail(testSubject);
}
await this.toggleContextMenu();
async expectExistsRemovePanelAction() {
this.log.debug('expectExistsRemovePanelAction');
await this.expectExistsPanelAction(REMOVE_PANEL_DATA_TEST_SUBJ);
}

async expectExistsEditPanelAction() {
async expectExistsEditPanelAction(title?: string) {
this.log.debug('expectExistsEditPanelAction');
await this.expectExistsPanelAction(EDIT_PANEL_DATA_TEST_SUBJ);
await this.expectExistsPanelAction(EDIT_PANEL_DATA_TEST_SUBJ, title);
}

async expectExistsReplacePanelAction() {
Expand All @@ -253,6 +246,22 @@ export class DashboardPanelActionsService extends FtrService {
await this.expectExistsPanelAction(CLONE_PANEL_DATA_TEST_SUBJ);
}

async expectExistsToggleExpandAction() {
this.log.debug('expectExistsToggleExpandAction');
await this.expectExistsPanelAction(TOGGLE_EXPAND_PANEL_DATA_TEST_SUBJ);
}

async expectMissingPanelAction(testSubject: string) {
this.log.debug('expectMissingPanelAction', testSubject);
await this.openContextMenu();
await this.testSubjects.missingOrFail(testSubject);
if (await this.hasContextMenuMoreItem()) {
await this.clickContextMenuMoreItem();
await this.testSubjects.missingOrFail(testSubject);
}
await this.toggleContextMenu();
}

async expectMissingEditPanelAction() {
this.log.debug('expectMissingEditPanelAction');
await this.expectMissingPanelAction(EDIT_PANEL_DATA_TEST_SUBJ);
Expand All @@ -273,11 +282,6 @@ export class DashboardPanelActionsService extends FtrService {
await this.expectMissingPanelAction(REMOVE_PANEL_DATA_TEST_SUBJ);
}

async expectExistsToggleExpandAction() {
this.log.debug('expectExistsToggleExpandAction');
await this.expectExistsPanelAction(TOGGLE_EXPAND_PANEL_DATA_TEST_SUBJ);
}

async getPanelHeading(title: string) {
return await this.testSubjects.find(`embeddablePanelHeading-${title.replace(/\s/g, '')}`);
}
Expand Down
2 changes: 2 additions & 0 deletions x-pack/test/functional/apps/dashboard/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@ export default function ({ loadTestFile }: FtrProviderContext) {
loadTestFile(require.resolve('./_async_dashboard'));
loadTestFile(require.resolve('./dashboard_lens_by_value'));
loadTestFile(require.resolve('./dashboard_maps_by_value'));

loadTestFile(require.resolve('./migration_smoke_tests/lens_migration_smoke_test'));
});
}
Loading