feat: update timeout error UX (#10274)

This commit is contained in:
Erik Ritter
2020-07-20 15:32:17 -07:00
committed by GitHub
parent d92cb66f60
commit 5fa4680447
29 changed files with 557 additions and 65 deletions

View File

@@ -40,7 +40,21 @@ describe('chart reducers', () => {
it('should update endtime on timeout', () => {
const newState = chartReducer(
charts,
actions.chartUpdateTimeout('timeout', 60, chartKey),
actions.chartUpdateFailed(
{
statusText: 'timeout',
error: 'Request timed out',
errors: [
{
error_type: 'FRONTEND_TIMEOUT_ERROR',
extra: { timeout: 1 },
level: 'error',
message: 'Request timed out',
},
],
},
chartKey,
),
);
expect(newState[chartKey].chartUpdateEndTime).toBeGreaterThan(0);
expect(newState[chartKey].chartStatus).toEqual('failed');