Skip to content

Commit

Permalink
Fix createSavedObject unit test (#667)
Browse files Browse the repository at this point in the history
Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>
  • Loading branch information
lezzago authored Aug 1, 2023
1 parent a11131f commit 92a9994
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`CreateNew renders 1`] = `
<div
className="create-new"
>
<EuiText
size="xs"
>
<p>
<a
href="https://opensearch.org/docs/latest/monitoring-plugins/alerting/index/"
target="_blank"
>
Learn more
<EuiIcon
type="popout"
/>
</a>
</p>
</EuiText>
<EuiSpacer
size="m"
/>
<div
className="create-new__title-and-toggle"
>
<EuiTitle
size="xxs"
>
<h4>
<EuiIcon
className="create-new__title-icon"
type="visLine"
/>
</h4>
</EuiTitle>
<EuiSwitch
checked={false}
label="Show visualization"
onChange={[Function]}
/>
</div>
<div
className="create-new__vis create-new__vis--hidden"
>
<EuiSpacer
size="s"
/>
<EmbeddableRenderer />
</div>
</div>
`;
1 change: 1 addition & 0 deletions public/utils/savedObjectHelper.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ describe('savedObjectHelper', function () {
});
it('createSavedObject with max associated objects to be 0', async () => {
setUIAugSettings(uiSettingsMock, true, 0);
setAugLoader([]);
try {
await createSavedObjectAssociation('monitorId', embeddable);
} catch (e) {
Expand Down

0 comments on commit 92a9994

Please sign in to comment.