Skip to content

Commit

Permalink
snaps
Browse files Browse the repository at this point in the history
  • Loading branch information
snide committed May 14, 2020
1 parent d277846 commit be83382
Showing 1 changed file with 108 additions and 106 deletions.
214 changes: 108 additions & 106 deletions src/core/public/chrome/chrome_service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ describe('start', () => {
expect(startDeps.notifications.toasts.addWarning.mock.calls).toMatchInlineSnapshot(`
Array [
Array [
"Your browser does not meet the security requirements for Kibana.",
Object {
"title": [Function],
},
],
]
`);
Expand Down Expand Up @@ -146,18 +148,18 @@ describe('start', () => {
service.stop();

await expect(promise).resolves.toMatchInlineSnapshot(`
Array [
Object {},
Object {
"logo": "big logo",
"smallLogo": "not so big logo",
},
Object {
"logo": "big logo without small logo",
"smallLogo": undefined,
},
]
`);
Array [
Object {},
Object {
"logo": "big logo",
"smallLogo": "not so big logo",
},
Object {
"logo": "big logo without small logo",
"smallLogo": undefined,
},
]
`);
});
});

Expand All @@ -175,13 +177,13 @@ describe('start', () => {
service.stop();

await expect(promise).resolves.toMatchInlineSnapshot(`
Array [
false,
false,
false,
false,
]
`);
Array [
false,
false,
false,
false,
]
`);
});

it('emits false until manually overridden when in embed mode', async () => {
Expand All @@ -203,13 +205,13 @@ describe('start', () => {
service.stop();

await expect(promise).resolves.toMatchInlineSnapshot(`
Array [
false,
false,
true,
false,
]
`);
Array [
false,
false,
true,
false,
]
`);
});

it('application-specified visibility on mount', async () => {
Expand All @@ -230,13 +232,13 @@ describe('start', () => {
service.stop();

await expect(promise).resolves.toMatchInlineSnapshot(`
Array [
false,
true,
false,
true,
]
`);
Array [
false,
true,
false,
true,
]
`);
});

it('changing visibility has no effect on chrome-hiding application', async () => {
Expand All @@ -253,12 +255,12 @@ describe('start', () => {
service.stop();

await expect(promise).resolves.toMatchInlineSnapshot(`
Array [
false,
false,
false,
]
`);
Array [
false,
false,
false,
]
`);
});
});

Expand All @@ -280,36 +282,36 @@ describe('start', () => {
service.stop();

await expect(promise).resolves.toMatchInlineSnapshot(`
Array [
Array [],
Array [
"foo",
],
Array [
"foo",
],
Array [
"foo",
"bar",
],
Array [
"foo",
"bar",
],
Array [
"foo",
"bar",
"baz",
],
Array [
"foo",
"baz",
],
Array [
"baz",
],
]
`);
Array [
Array [],
Array [
"foo",
],
Array [
"foo",
],
Array [
"foo",
"bar",
],
Array [
"foo",
"bar",
],
Array [
"foo",
"bar",
"baz",
],
Array [
"foo",
"baz",
],
Array [
"baz",
],
]
`);
});
});

Expand All @@ -327,19 +329,19 @@ describe('start', () => {
service.stop();

await expect(promise).resolves.toMatchInlineSnapshot(`
Array [
undefined,
Object {
"text": "foo",
"tooltip": "foo's tooltip",
},
Object {
"text": "bar",
"tooltip": "bar's tooltip",
},
undefined,
]
`);
Array [
undefined,
Object {
"text": "foo",
"tooltip": "foo's tooltip",
},
Object {
"text": "bar",
"tooltip": "bar's tooltip",
},
undefined,
]
`);
});
});

Expand All @@ -358,29 +360,29 @@ describe('start', () => {
service.stop();

await expect(promise).resolves.toMatchInlineSnapshot(`
Array [
Array [],
Array [
Object {
"text": "foo",
},
Object {
"text": "bar",
},
],
Array [
Object {
"text": "foo",
},
],
Array [
Object {
"text": "bar",
},
],
Array [],
]
`);
Array [
Array [],
Array [
Object {
"text": "foo",
},
Object {
"text": "bar",
},
],
Array [
Object {
"text": "foo",
},
],
Array [
Object {
"text": "bar",
},
],
Array [],
]
`);
});
});

Expand Down

0 comments on commit be83382

Please sign in to comment.