Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit db34560

Browse files
author
Shammamah Hossain
committed
Update loading component tests.
1 parent a09a508 commit db34560

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/unit/Loading.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ test('Loading renders', () => {
1414
</Loading>
1515
);
1616

17-
expect(loading.html()).toMatchSnapshot('Loading with is_loading=true');
17+
expect(loading.find('.dash-spinner').parent().html()).toMatchSnapshot('Loading with is_loading=true');
1818
});
1919
test('Loading renders without loading_state', () => {
2020
const loading = render(
@@ -49,7 +49,7 @@ test('Loading renders without prop_name', () => {
4949
</Loading>
5050
);
5151

52-
expect(loading.html()).toMatchSnapshot('Loading with is_loading=true');
52+
expect(loading.find('.dash-spinner').parent().html()).toMatchSnapshot('Loading with is_loading=true');
5353
});
5454
test('Loading renders without loading_state.component_name', () => {
5555
const statusMock = {
@@ -62,7 +62,7 @@ test('Loading renders without loading_state.component_name', () => {
6262
</Loading>
6363
);
6464

65-
expect(loading.html()).toMatchSnapshot('Loading with is_loading=true');
65+
expect(loading.find('.dash-spinner').parent().html()).toMatchSnapshot('Loading with is_loading=true');
6666
});
6767
test('Loading renders with multiple children', () => {
6868
const statusMock = {
@@ -78,7 +78,7 @@ test('Loading renders with multiple children', () => {
7878
</Loading>
7979
);
8080

81-
expect(loading.html()).toMatchSnapshot('Loading with is_loading=true');
81+
expect(loading.find('.dash-spinner').parent().html()).toMatchSnapshot('Loading with is_loading=true');
8282
});
8383

8484
test("Loading checks all it's children for a loading_state", () => {

0 commit comments

Comments
 (0)