mirror of
https://github.com/apache/superset.git
synced 2026-04-21 09:04:38 +00:00
fix: humanised changed on UTC on dashboards and charts (#10321)
* fix: API marshmallow3 drop utc for naive datetime fields * fix: API marshmallow3 drop utc for naive datetime fields * fix, tests * isort and test * black * add and fix test * fix comment
This commit is contained in:
committed by
GitHub
parent
ac85aebe4a
commit
74cb82e1ad
@@ -105,7 +105,7 @@ describe('ChartList', () => {
|
||||
const callsD = fetchMock.calls(/chart\/\?q/);
|
||||
expect(callsD).toHaveLength(1);
|
||||
expect(callsD[0][0]).toMatchInlineSnapshot(
|
||||
`"http://localhost/api/v1/chart/?q=(order_column:changed_on,order_direction:desc,page:0,page_size:25)"`,
|
||||
`"http://localhost/api/v1/chart/?q=(order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:25)"`,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -43,7 +43,8 @@ const mockDashboards = [...new Array(3)].map((_, i) => ({
|
||||
changed_by_url: 'changed_by_url',
|
||||
changed_by_fk: 1,
|
||||
published: true,
|
||||
changed_on: new Date().toISOString(),
|
||||
changed_on_utc: new Date().toISOString(),
|
||||
changed_on_delta_humanized: '5 minutes ago',
|
||||
owners: [{ first_name: 'admin', last_name: 'admin_user' }],
|
||||
}));
|
||||
|
||||
@@ -95,7 +96,7 @@ describe('DashboardList', () => {
|
||||
const callsD = fetchMock.calls(/dashboard\/\?q/);
|
||||
expect(callsD).toHaveLength(1);
|
||||
expect(callsD[0][0]).toMatchInlineSnapshot(
|
||||
`"http://localhost/api/v1/dashboard/?q=(order_column:changed_on,order_direction:desc,page:0,page_size:25)"`,
|
||||
`"http://localhost/api/v1/dashboard/?q=(order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:25)"`,
|
||||
);
|
||||
});
|
||||
it('edits', () => {
|
||||
|
||||
Reference in New Issue
Block a user