Skip to content

Commit 2e3b50f

Browse files
committed
adjustments
1 parent 5238727 commit 2e3b50f

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

packages/compass-global-writes/src/components/states/loading-error.spec.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import React from 'react';
22
import { expect } from 'chai';
3-
import { screen, userEvent } from '@mongodb-js/testing-library-compass';
3+
import { screen } from '@mongodb-js/testing-library-compass';
44
import { LoadingError } from './loading-error';
55
import { renderWithStore } from '../../../tests/create-store';
6-
import Sinon from 'sinon';
76

87
const error = 'Test failure';
98

packages/compass-global-writes/src/components/states/loading-error.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ export default connect((state: RootState) => {
2121
throw new Error('Error not found in LoadingError');
2222
}
2323
return {
24-
error: state.error,
24+
error: state.loadingError,
2525
};
2626
})(LoadingError);

packages/compass-global-writes/src/store/reducer.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -221,14 +221,14 @@ export type RootState = {
221221
shardKey?: ShardKey;
222222
shardingError?: never;
223223
pollingTimeout?: never;
224-
error: string;
224+
loadingError: string;
225225
}
226226
| {
227227
status: ShardingStatuses.NOT_READY;
228228
shardKey?: never;
229229
shardingError?: never;
230230
pollingTimeout?: never;
231-
error?: never;
231+
loadingError?: never;
232232
}
233233
| {
234234
status:
@@ -240,7 +240,7 @@ export type RootState = {
240240
// and then unmanaged
241241
shardingError?: never;
242242
pollingTimeout?: never;
243-
error?: never;
243+
loadingError?: never;
244244
}
245245
| {
246246
status: ShardingStatuses.SHARDING;
@@ -251,7 +251,7 @@ export type RootState = {
251251
shardKey?: ShardKey;
252252
shardingError?: never;
253253
pollingTimeout?: NodeJS.Timeout;
254-
error?: never;
254+
loadingError?: never;
255255
}
256256
| {
257257
status:
@@ -261,7 +261,7 @@ export type RootState = {
261261
shardKey?: never;
262262
shardingError: string;
263263
pollingTimeout?: never;
264-
error?: never;
264+
loadingError?: never;
265265
}
266266
| {
267267
status:
@@ -275,7 +275,7 @@ export type RootState = {
275275
shardKey: ShardKey;
276276
shardingError?: never;
277277
pollingTimeout?: never;
278-
error?: never;
278+
loadingError?: never;
279279
}
280280
);
281281

@@ -637,7 +637,7 @@ const reducer: Reducer<RootState, Action> = (state = initialState, action) => {
637637
return {
638638
...state,
639639
status: ShardingStatuses.LOADING_ERROR,
640-
error: action.error,
640+
loadingError: action.error,
641641
pollingTimeout: state.pollingTimeout,
642642
};
643643
}

0 commit comments

Comments
 (0)