Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework "Backend is not available" error page #930

Merged
merged 7 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 21 additions & 16 deletions .deps/dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,18 @@
| [`@istanbuljs/schema@0.1.3`](git+https://github.com/istanbuljs/schema.git) | MIT | clearlydefined |
| [`@jest/console@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`@jest/core@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`@jest/environment@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`@jest/environment@29.7.0`](https://github.com/jestjs/jest.git) | MIT | clearlydefined |
| [`@jest/expect-utils@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`@jest/expect@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`@jest/fake-timers@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`@jest/fake-timers@29.7.0`](https://github.com/jestjs/jest.git) | MIT | clearlydefined |
| [`@jest/globals@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`@jest/reporters@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`@jest/schemas@29.6.0`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`@jest/source-map@29.6.0`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`@jest/test-result@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`@jest/test-sequencer@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`@jest/test-sequencer@29.7.0`](https://github.com/jestjs/jest.git) | MIT | clearlydefined |
| [`@jest/transform@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`@jest/types@29.6.1`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`@jest/types@29.6.3`](https://github.com/jestjs/jest.git) | MIT | clearlydefined |
| [`@jridgewell/gen-mapping@0.3.3`](https://github.com/jridgewell/gen-mapping) | MIT | clearlydefined |
| [`@jridgewell/resolve-uri@3.1.1`](https://github.com/jridgewell/resolve-uri) | MIT | clearlydefined |
| [`@jridgewell/set-array@1.1.2`](https://github.com/jridgewell/set-array) | MIT | clearlydefined |
Expand Down Expand Up @@ -138,7 +138,7 @@
| [`@sinonjs/commons@3.0.0`](git+https://github.com/sinonjs/commons.git) | BSD-3-Clause | clearlydefined |
| [`@sinonjs/fake-timers@10.3.0`](https://github.com/sinonjs/fake-timers.git) | BSD-3-Clause | #9214 |
| [`@testing-library/dom@7.31.2`](https://github.com/testing-library/dom-testing-library) | MIT | (clearlydefined)[https://clearlydefined.io/definitions/npm/npmjs/@testing-library/dom/7.31.2] |
| [`@testing-library/jest-dom@5.17.0`](https://github.com/testing-library/jest-dom) | MIT | clearlydefined |
| [`@testing-library/jest-dom@6.1.3`](https://github.com/testing-library/jest-dom) | MIT | clearlydefined |
| [`@testing-library/react@10.4.9`](https://github.com/testing-library/react-testing-library) | MIT | clearlydefined |
| [`@testing-library/user-event@12.8.3`](https://github.com/testing-library/user-event) | MIT | clearlydefined |
| [`@tootallnate/once@2.0.0`](git://github.com/TooTallNate/once.git) | MIT | clearlydefined |
Expand Down Expand Up @@ -253,11 +253,12 @@
| [`at-least-node@1.0.0`](git+https://github.com/RyanZim/at-least-node.git) | ISC | clearlydefined |
| [`available-typed-arrays@1.0.5`](git+https://github.com/inspect-js/available-typed-arrays.git) | MIT | clearlydefined |
| [`axios-mock-adapter@1.21.5`](git+https://github.com/ctimmerm/axios-mock-adapter.git) | MIT | clearlydefined |
| [`babel-jest@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`axios@1.4.0`](https://github.com/axios/axios.git) | MIT | clearlydefined |
| [`babel-jest@29.7.0`](https://github.com/jestjs/jest.git) | MIT | clearlydefined |
| [`babel-plugin-istanbul@6.1.1`](git+https://github.com/istanbuljs/babel-plugin-istanbul.git) | BSD-3-Clause | clearlydefined |
| [`babel-plugin-jest-hoist@29.5.0`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`babel-plugin-jest-hoist@29.6.3`](https://github.com/jestjs/jest.git) | MIT | clearlydefined |
| [`babel-preset-current-node-syntax@1.0.1`](https://github.com/nicolo-ribaudo/babel-preset-current-node-syntax.git) | MIT | clearlydefined |
| [`babel-preset-jest@29.5.0`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`babel-preset-jest@29.6.3`](https://github.com/jestjs/jest.git) | MIT | clearlydefined |
| [`before-after-hook@2.2.3`](https://github.com/gr2m/before-after-hook.git) | Apache-2.0 | clearlydefined |
| [`big-integer@1.6.51`](git@github.com:peterolson/BigInteger.js.git) | Unlicense | #2439 |
| [`big.js@5.2.2`](https://github.com/MikeMcl/big.js.git) | MIT | clearlydefined |
Expand All @@ -279,7 +280,7 @@
| [`callsites@3.1.0`](https://github.com/sindresorhus/callsites.git) | MIT | clearlydefined |
| [`camel-case@4.1.2`](git://github.com/blakeembrey/change-case.git) | MIT | clearlydefined |
| [`camelcase-keys@6.2.2`](https://github.com/sindresorhus/camelcase-keys.git) | MIT | clearlydefined |
| [`camelcase@5.3.1`](https://github.com/sindresorhus/camelcase.git) | MIT | clearlydefined |
| [`camelcase@6.3.0`](https://github.com/sindresorhus/camelcase.git) | MIT | clearlydefined |
| [`caniuse-api@3.0.0`](https://github.com/nyalab/caniuse-api.git) | MIT | clearlydefined |
| [`caniuse-lite@1.0.30001521`](https://github.com/browserslist/caniuse-lite.git) | CC-BY-4.0 | #1196 |
| [`chalk@4.1.2`](https://github.com/chalk/chalk.git) | MIT | clearlydefined |
Expand Down Expand Up @@ -324,6 +325,7 @@
| [`copy-webpack-plugin@11.0.0`](https://github.com/webpack-contrib/copy-webpack-plugin.git) | MIT | clearlydefined |
| [`core-js-pure@3.32.0`](https://github.com/zloirock/core-js.git) | MIT | #9880 |
| [`cosmiconfig@7.0.0`](git+https://github.com/davidtheclark/cosmiconfig.git) | MIT | clearlydefined |
| [`create-jest@29.7.0`](https://github.com/jestjs/jest.git) | MIT | clearlydefined |
| [`cross-spawn@7.0.3`](git@github.com:moxystudio/node-cross-spawn.git) | MIT | clearlydefined |
| [`crypto-random-string@2.0.0`](https://github.com/sindresorhus/crypto-random-string.git) | MIT | clearlydefined |
| [`css-declaration-sorter@6.4.1`](https://github.com/Siilwyn/css-declaration-sorter.git) | ISC | #9434 |
Expand Down Expand Up @@ -559,34 +561,35 @@
| [`jackspeak@2.3.0`](git+https://github.com/isaacs/jackspeak.git) | BlueOak-1.0.0 | transitive dependency |
| [`jake@10.8.7`](git://github.com/jakejs/jake.git) | Apache-2.0 | #1316 |
| [`jest-changed-files@29.5.0`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`jest-circus@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`jest-circus@29.7.0`](https://github.com/jestjs/jest.git) | MIT | clearlydefined |
| [`jest-cli@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`jest-config@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`jest-config@29.7.0`](https://github.com/jestjs/jest.git) | MIT | clearlydefined |
| [`jest-diff@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`jest-docblock@29.4.3`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`jest-each@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`jest-environment-jsdom@29.6.2`](https://github.com/facebook/jest.git) | MIT | #9317 |
| [`jest-each@29.7.0`](https://github.com/jestjs/jest.git) | MIT | clearlydefined |
| [`jest-environment-jsdom@29.7.0`](https://github.com/jestjs/jest.git) | MIT | clearlydefined |
| [`jest-environment-node@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`jest-get-type@29.4.3`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`jest-haste-map@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`jest-leak-detector@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`jest-matcher-utils@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`jest-message-util@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`jest-mock@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`jest-mock@29.7.0`](https://github.com/jestjs/jest.git) | MIT | clearlydefined |
| [`jest-pnp-resolver@1.2.3`](https://github.com/arcanis/jest-pnp-resolver.git) | MIT | clearlydefined |
| [`jest-regex-util@29.4.3`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`jest-resolve-dependencies@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`jest-resolve@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`jest-runner@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`jest-runtime@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`jest-snapshot@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`jest-util@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`jest-util@29.7.0`](https://github.com/jestjs/jest.git) | MIT | clearlydefined |
| [`jest-validate@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`jest-watcher@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`jest-websocket-mock@2.4.1`](git+https://github.com/romgain/jest-websocket-mock.git) | MIT | clearlydefined |
| [`jest-worker@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`jest@29.6.2`](https://github.com/facebook/jest.git) | MIT | clearlydefined |
| [`jsdom@20.0.3`](https://github.com/jsdom/jsdom.git) | MIT | #7436 |
| [`jsesc@2.5.2`](https://github.com/mathiasbynens/jsesc.git) | MIT | clearlydefined |
| [`json-parse-better-errors@1.0.2`](https://github.com/zkat/json-parse-better-errors) | MIT | clearlydefined |
| [`json-parse-even-better-errors@3.0.0`](https://github.com/npm/json-parse-even-better-errors.git) | MIT | clearlydefined |
| [`json-stable-stringify-without-jsonify@1.0.1`](git://github.com/samn/json-stable-stringify.git) | MIT | clearlydefined |
Expand All @@ -600,6 +603,7 @@
| [`kleur@3.0.3`](https://github.com/lukeed/kleur.git) | MIT | clearlydefined |
| [`known-css-properties@0.27.0`](https://github.com/known-css/known-css-properties.git) | MIT | clearlydefined |
| [`lerna@6.6.2`](git+https://github.com/lerna/lerna.git) | MIT | #7595 |
| [`leven@3.1.0`](https://github.com/sindresorhus/leven.git) | MIT | clearlydefined |
| [`levn@0.4.1`](git://github.com/gkz/levn.git) | MIT | clearlydefined |
| [`libnpmaccess@6.0.4`](https://github.com/npm/cli.git) | ISC | clearlydefined |
| [`libnpmpublish@7.1.4`](https://github.com/npm/cli.git) | ISC | clearlydefined |
Expand Down Expand Up @@ -841,7 +845,7 @@
| [`string.prototype.trimstart@1.0.6`](git://github.com/es-shims/String.prototype.trimStart.git) | MIT | #4647 |
| [`strip-ansi-cjs@6.0.1`](https://github.com/chalk/strip-ansi.git) | MIT | transitive dependency |
| [`strip-ansi@6.0.1`](https://github.com/chalk/strip-ansi.git) | MIT | clearlydefined |
| [`strip-bom@3.0.0`](https://github.com/sindresorhus/strip-bom.git) | MIT | clearlydefined |
| [`strip-bom@4.0.0`](https://github.com/sindresorhus/strip-bom.git) | MIT | clearlydefined |
| [`strip-final-newline@2.0.0`](https://github.com/sindresorhus/strip-final-newline.git) | MIT | clearlydefined |
| [`strip-indent@3.0.0`](https://github.com/sindresorhus/strip-indent.git) | MIT | clearlydefined |
| [`strip-json-comments@3.1.1`](https://github.com/sindresorhus/strip-json-comments.git) | MIT | clearlydefined |
Expand Down Expand Up @@ -875,6 +879,7 @@
| [`through2@4.0.2`](https://github.com/rvagg/through2.git) | MIT | clearlydefined |
| [`through@2.3.8`](https://github.com/dominictarr/through.git) | MIT | #1036 |
| [`titleize@3.0.0`](https://github.com/sindresorhus/titleize.git) | MIT | clearlydefined |
| [`to-fast-properties@2.0.0`](https://github.com/sindresorhus/to-fast-properties.git) | MIT | clearlydefined |
| [`to-regex-range@5.0.1`](https://github.com/micromatch/to-regex-range.git) | MIT | clearlydefined |
| [`totalist@1.1.0`](https://github.com/lukeed/totalist.git) | MIT | clearlydefined |
| [`touch@3.1.0`](git://github.com/isaacs/node-touch.git) | ISC | clearlydefined |
Expand Down
2 changes: 0 additions & 2 deletions .deps/prod.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
| [`@eclipse-che/dashboard-backend@7.75.0-next`](https://github.com/eclipse-che/che-dashboard) | EPL-2.0 | ecd.che |
| [`@eclipse-che/dashboard-frontend@7.75.0-next`](git://github.com/eclipse/che-dashboard.git) | EPL-2.0 | ecd.che |
| [`@eclipse-che/devfile-converter@0.0.1-ff55f9a`](git+https://github.com/che-incubator/devfile-converter.git) | EPL-2.0 | ecd.che |
| [`@eclipse-che/workspace-client@0.0.1-1672830275`](https://github.com/eclipse/che-workspace-client) | EPL-2.0 | ecd.che |
| [`@fastify/accept-negotiator@1.1.0`](git+https://github.com/fastify/accept-negotiator.git) | MIT | clearlydefined |
| [`@fastify/ajv-compiler@3.5.0`](git+https://github.com/fastify/ajv-compiler.git) | MIT | clearlydefined |
| [`@fastify/cookie@8.3.0`](git+ssh://git@github.com/fastify/fastify-cookie.git) | MIT | clearlydefined |
Expand Down Expand Up @@ -379,7 +378,6 @@
| [`trim-right@1.0.1`](https://github.com/sindresorhus/trim-right.git) | MIT | clearlydefined |
| [`tslib@2.6.1`](https://github.com/Microsoft/tslib.git) | 0BSD | #9189 |
| [`tunnel-agent@0.6.0`](https://github.com/mikeal/tunnel-agent) | Apache-2.0 | clearlydefined |
| [`tunnel@0.0.6`](https://github.com/koichik/node-tunnel.git) | MIT | clearlydefined |
| [`tweetnacl@0.14.5`](https://github.com/dchest/tweetnacl-js.git) | Unlicense | #1035 |
| [`type-fest@1.4.0`](https://github.com/sindresorhus/type-fest.git) | (MIT OR CC0-1.0) | clearlydefined |
| [`underscore@1.13.6`](git://github.com/jashkenas/underscore.git) | MIT | clearlydefined |
Expand Down
21 changes: 21 additions & 0 deletions packages/common/src/helpers/__tests__/errors.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,5 +335,26 @@ describe('Errors helper', () => {
};
expect(getMessage(error)).toEqual(expectedMessage);
});

it('should return a message if `error.response.data` includes a HTML page', () => {
const htmlPage =
'<!DOCTYPE html><html><head></head><body>...</body></html>';
const error = {
name: 'Error',
config: {},
request: {},
response: {
data: htmlPage,
status: 500,
statusText: 'Internal Server Error',
headers: {},
config: {},
request: {},
},
message: '"500" returned by "/kubernetes/namespace/provision".',
};

expect(getMessage(error)).toEqual(error.message);
});
});
});
4 changes: 3 additions & 1 deletion packages/common/src/helpers/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ export function getMessage(error: unknown): string {
if (includesAxiosResponse(error)) {
const response = error.response;
if (typeof response.data === 'string') {
return response.data;
if (response.data.toLowerCase().trim().indexOf('<!doctype') !== 0) {
akurinnoy marked this conversation as resolved.
Show resolved Hide resolved
return response.data;
}
} else if (response.data.message) {
return response.data.message;
} else if (response.config.url) {
Expand Down
7 changes: 3 additions & 4 deletions packages/dashboard-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
},
"dependencies": {
"@eclipse-che/devfile-converter": "0.0.1-ff55f9a",
"@eclipse-che/workspace-client": "0.0.1-1672830275",
"@patternfly/react-core": "^4.276.11",
"@patternfly/react-icons": "^4.93.7",
"@patternfly/react-table": "^4.113.3",
Expand Down Expand Up @@ -80,7 +79,7 @@
"@kubernetes/client-node": "^0.18.1",
"@react-mock/state": "^0.1.8",
"@testing-library/dom": "^7.30.3",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/jest-dom": "^6.1.3",
"@testing-library/react": "^10.3.0",
"@testing-library/user-event": "^12.1",
"@types/axios": "^0.14.0",
Expand Down Expand Up @@ -113,8 +112,8 @@
"hard-source-webpack-plugin": "^0.13.1",
"html-webpack-plugin": "^5.5.3",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.6.2",
"jest-environment-jsdom": "^29.6.2",
"jest": "^29.7.0",
olexii4 marked this conversation as resolved.
Show resolved Hide resolved
"jest-environment-jsdom": "^29.6.4",
"jest-websocket-mock": "^2.4.1",
"loader-utils": "^3.2.1",
"mini-css-extract-plugin": "^2.7.6",
Expand Down
11 changes: 11 additions & 0 deletions packages/dashboard-frontend/src/Layout/ErrorBoundary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ type State = {

export class ErrorBoundary extends React.PureComponent<Props, State> {
private readonly toDispose = new DisposableCollection();
private notFoundCallback: (error?: Error) => void;

constructor(props: Props) {
super(props);
Expand Down Expand Up @@ -74,6 +75,9 @@ export class ErrorBoundary extends React.PureComponent<Props, State> {
});

if (this.testResourceNotFound(error)) {
if (this.notFoundCallback) {
this.notFoundCallback(error);
}
this.setState({
shouldReload: true,
});
Expand All @@ -95,6 +99,13 @@ export class ErrorBoundary extends React.PureComponent<Props, State> {
this.toDispose.dispose();
}

/**
* This method is used from parent component by reference.
*/
public setCallback(notFoundCallback: (error?: Error) => void): void {
this.notFoundCallback = notFoundCallback;
}

private testResourceNotFound(error: Error): boolean {
return /loading chunk [\d]+ failed/i.test(error.message);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,31 +138,6 @@ describe('StoreErrorAlert component', () => {
const workspacesSettingsAlert = screen.queryByRole('heading', { name: /expected error 7/i });
expect(workspacesSettingsAlert).toBeFalsy();
});

it('should show sanity check error after bootstrap', () => {
const store = new FakeStoreBuilder().build();
const { rerender } = renderComponent(store);

// no alerts at this point
const alertHeading = screen.queryByRole('heading', { name: /danger alert/i });
expect(alertHeading).toBeFalsy();

const nextStore = new FakeStoreBuilder()
.withSanityCheck({
error: 'expected error',
})
.build();
rerender(
<Provider store={nextStore}>
<AppAlertGroup />
<StoreErrorsAlert />
</Provider>,
);

const nextAlertHeading = screen.queryByRole('heading', { name: /danger alert/i });
expect(nextAlertHeading).toBeTruthy();
expect(nextAlertHeading).toHaveTextContent('expected error');
});
});

function renderComponent(store: Store): RenderResult {
Expand Down
14 changes: 12 additions & 2 deletions packages/dashboard-frontend/src/Layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { selectBranding } from '../store/Branding/selectors';
import { ToggleBarsContext } from '../contexts/ToggleBars';
import { signOut } from '../services/helpers/login';
import { selectDashboardLogo } from '../store/ServerConfig/selectors';
import * as SanityCheckStore from '../store/SanityCheck';

const IS_MANAGED_SIDEBAR = false;

Expand All @@ -45,10 +46,13 @@ type State = {
export class Layout extends React.PureComponent<Props, State> {
@lazyInject(IssuesReporterService)
private readonly issuesReporterService: IssuesReporterService;
private readonly errorBoundaryRef: React.RefObject<ErrorBoundary>;

constructor(props: Props) {
super(props);

this.errorBoundaryRef = React.createRef<ErrorBoundary>();

this.state = {
isHeaderVisible: true,
isSidebarVisible: true,
Expand Down Expand Up @@ -85,6 +89,12 @@ export class Layout extends React.PureComponent<Props, State> {
if (matchFactoryLoaderPath !== null || matchIdeLoaderPath !== null) {
this.hideAllBars();
}
this.errorBoundaryRef.current?.setCallback((error?: Error) => {
if (error?.message) {
console.error(error.message);
}
this.props.testBackends();
});
}

public render(): React.ReactElement {
Expand Down Expand Up @@ -135,7 +145,7 @@ export class Layout extends React.PureComponent<Props, State> {
}
isManagedSidebar={IS_MANAGED_SIDEBAR}
>
<ErrorBoundary>
<ErrorBoundary ref={this.errorBoundaryRef}>
olexii4 marked this conversation as resolved.
Show resolved Hide resolved
<StoreErrorsAlert />
<BannerAlert />
{this.props.children}
Expand All @@ -151,7 +161,7 @@ const mapStateToProps = (state: AppState) => ({
dashboardLogo: selectDashboardLogo(state),
});

const connector = connect(mapStateToProps);
const connector = connect(mapStateToProps, SanityCheckStore.actionCreators);

type MappedProps = ConnectedProps<typeof connector>;
export default connector(Layout);
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ describe('Workspace creation time', () => {

await waitFor(
() => expect(mockPost).toBeCalledWith('/api/factory/resolver', expect.anything()),
{ timeout: 6000 },
{ timeout: 8000 },
);
expect(mockPost).toHaveBeenCalledTimes(1);
expect(mockGet).not.toHaveBeenCalled();
Expand Down
Loading
Loading