Skip to content

Commit

Permalink
Attempt #2 with render complete
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomThomson committed Oct 28, 2021
1 parent 27ae3de commit d9c5348
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ export class HelloWorldEmbeddable extends Embeddable {
* @param node
*/
public render(node: HTMLElement) {
node.innerHTML = '<div data-test-subj="helloWorldEmbeddable">HELLO WORLD!</div>';
node.innerHTML =
'<div data-test-subj="helloWorldEmbeddable" data-render-complete="true">HELLO WORLD!</div>';
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function wrapSearchTerms(task: string, search?: string) {

export function TodoEmbeddableComponentInner({ input: { icon, title, task, search } }: Props) {
return (
<EuiFlexGroup gutterSize="none">
<EuiFlexGroup gutterSize="none" data-render-complete="true">
<EuiFlexItem grow={false}>
{icon ? <EuiIcon type={icon} size="l" /> : <EuiAvatar name={title || task} size="l" />}
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function TodoRefEmbeddableComponentInner({
const title = savedAttributes?.title;
const task = savedAttributes?.task;
return (
<EuiFlexGroup>
<EuiFlexGroup data-render-complete="true">
<EuiFlexItem grow={false}>
{icon ? (
<EuiIcon type={icon} size="l" />
Expand Down
4 changes: 2 additions & 2 deletions test/examples/embeddables/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide
const pieChart = getService('pieChart');
const dashboardExpect = getService('dashboardExpect');
const elasticChart = getService('elasticChart');
const PageObjects = getPageObjects(['common', 'visChart', 'header']);
const PageObjects = getPageObjects(['common', 'visChart', 'dashboard']);
const monacoEditor = getService('monacoEditor');

describe.only('dashboard container', () => {
Expand All @@ -108,7 +108,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide
);
await PageObjects.common.navigateToApp('dashboardEmbeddableExamples');
await testSubjects.click('dashboardEmbeddableByValue');
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.dashboard.waitForRenderComplete();

await updateInput(JSON.stringify(testDashboardInput, null, 4));
});
Expand Down

0 comments on commit d9c5348

Please sign in to comment.