fix(sqllab): Invalid start date (#25133)

This commit is contained in:
JUST.in DO IT
2023-09-01 11:28:19 -07:00
committed by GitHub
parent e391a1b49e
commit 8b2a408dea
6 changed files with 32 additions and 4 deletions

View File

@@ -364,16 +364,24 @@ describe('sqlLabReducer', () => {
expect(Object.keys(newState.queries)).toHaveLength(0);
});
it('should refresh queries when polling returns new results', () => {
const startDttmInStr = '1693433503447.166992';
const endDttmInStr = '1693433503500.23132';
newState = sqlLabReducer(
{
...newState,
queries: { abcd: {} },
},
actions.refreshQueries({
abcd: query,
abcd: {
...query,
startDttm: startDttmInStr,
endDttm: endDttmInStr,
},
}),
);
expect(newState.queries.abcd.changed_on).toBe(DENORMALIZED_CHANGED_ON);
expect(newState.queries.abcd.startDttm).toBe(Number(startDttmInStr));
expect(newState.queries.abcd.endDttm).toBe(Number(endDttmInStr));
expect(newState.queriesLastUpdate).toBe(CHANGED_ON_TIMESTAMP);
});
it('should refresh queries when polling returns empty', () => {