Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ export class VisualizeEmbeddable extends Embeddable<VisualizeInput, VisualizeOut

div.setAttribute('data-test-subj', 'visualizationLoader');
div.setAttribute('data-shared-item', '');
div.setAttribute('data-shared-item-container', '');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, this is still not right:

  • the spelling of the attribute should be data-shared-items-container with an S after "items"
  • this part of the code makes the container surround every visualization, even when on a dashboard page. So now the dashboard page will have more than one sharable container, which causes a different error.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Please take a look: #52370

div.setAttribute('data-rendering-count', '0');
div.setAttribute('data-render-complete', 'false');

Expand Down
4 changes: 3 additions & 1 deletion test/functional/apps/visualize/_shared_item.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function ({ getService, getPageObjects }) {
await PageObjects.common.navigateToApp('visualize');
});

it('should have the correct data-shared-item title and description', async function () {
it('should have the correct data-shared-item title and description, and sharedItemContainer should exist', async function () {
const expected = {
title: 'Shared-Item Visualization AreaChart',
description: 'AreaChart'
Expand All @@ -41,6 +41,8 @@ export default function ({ getService, getPageObjects }) {
const { title, description } = await PageObjects.common.getSharedItemTitleAndDescription();
expect(title).to.eql(expected.title);
expect(description).to.eql(expected.description);
const sharedItemContainers = await PageObjects.common.getSharedItemContainers();
expect(sharedItemContainers.length).to.be(1);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

});
});
});
Expand Down
5 changes: 5 additions & 0 deletions test/functional/page_objects/common_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,11 @@ export function CommonPageProvider({ getService, getPageObjects }: FtrProviderCo
};
}

async getSharedItemContainers() {
const cssSelector = '[data-shared-item-container]';
return find.allByCssSelector(cssSelector);
}

async ensureModalOverlayHidden() {
return retry.try(async () => {
const shown = await testSubjects.exists('confirmModalTitleText');
Expand Down