Skip to content

Commit

Permalink
Fix unit test timezones etc
Browse files Browse the repository at this point in the history
  • Loading branch information
tlrobinson committed May 8, 2018
1 parent 4d750f7 commit d171d98
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frontend/test/__support__/sample_dataset_fixture.js
Original file line number Diff line number Diff line change
Expand Up @@ -1484,7 +1484,7 @@ export const clickedDateTimeValue = {
...metadata.fields[ORDERS_CREATED_DATE_FIELD_ID],
source: "fields",
},
value: "2018-01-01T00:00:00.000Z",
value: "2018-01-01T00:00:00Z",
};

export const clickedMetric = {
Expand Down
20 changes: 20 additions & 0 deletions frontend/test/internal/__snapshots__/components.unit.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,26 @@ exports[`EntityMenu should render "Share menu" correctly 1`] = `
</div>
`;

exports[`ProgressBar should render "Animated" correctly 1`] = `
<div
className="xt xu xv xn"
>
<div
className="xw xx xt xy xz x10 x11 x12 x13 x1d x1e x16 x17 x18 x1f x1a x1b x1g"
/>
</div>
`;

exports[`ProgressBar should render "Default" correctly 1`] = `
<div
className="xt xu xv xn"
>
<div
className="xw xx xt xy xz x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x1a x1b x1c"
/>
</div>
`;

exports[`Select should render "Default" correctly 1`] = `
<a
className="no-decoration"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe("UnderlyingRecordsDrill", () => {
expect(UnderlyingRecordsDrill({ question })).toHaveLength(0);
});
it("should be return correct new card for breakout by month", () => {
const value = "2018-01-01T00:00:00.000Z";
const value = "2018-01-01T00:00:00Z";
const actions = UnderlyingRecordsDrill(
getActionPropsForTimeseriesClick("month", value),
);
Expand Down
3 changes: 1 addition & 2 deletions frontend/test/modes/lib/actions.unit.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable flowtype/require-valid-file-annotation */

import { drillFilter } from "metabase/qb/lib/actions";
import moment from "moment";

describe("actions", () => {
describe("drillFilter", () => {
Expand All @@ -13,7 +12,7 @@ describe("actions", () => {
query: {},
},
},
moment("2018-04-27T00:00:00.000+02:00"),
"2018-04-27T00:00:00.000+02:00",
{
base_type: "type/DateTime",
id: 123,
Expand Down

0 comments on commit d171d98

Please sign in to comment.