Skip to content

Commit c4d7ce7

Browse files
committed
Merge branch 'main' of github.com:drivenets/design-system into drivenets/michal/AR-41918
2 parents e73622e + b89c6e3 commit c4d7ce7

5 files changed

Lines changed: 18 additions & 27 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ Before submitting a PR, run a local code review (apply latest `main` changes!):
8484
- Commit your changes with a descriptive message following the Conventional Commits standard (e.g., `feat(design-system): add new button component [TICKET-ID]`).
8585
- Add a changelog entry if needed using `pnpm changelog`.
8686
See [Intro to Using Changesets](https://github.com/changesets/changesets/blob/main/docs/intro-to-using-changesets.md) and [Adding a Changeset](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md) for more details.
87+
If your change doesn’t require a new release, you can add the `skip changelog` label to the GitHub PR.
8788
- Push your branch and open a pull request for review.
8889

8990
> [!NOTE]

packages/design-system/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
"eslint-plugin-react-hooks": "^7.0.1",
9898
"eslint-plugin-storybook": "^10.2.4",
9999
"jsdom": "^25.0.1",
100+
"mockdate": "^3.0.5",
100101
"playwright": "^1.58.1",
101102
"postcss": "^8.5.6",
102103
"postcss-modules": "^6.0.1",

packages/design-system/src/components/ds-date-input/ds-date-input.stories.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Meta, StoryObj } from '@storybook/react-vite';
22
import { useState } from 'react';
33
import { expect, screen, userEvent, waitFor, within } from 'storybook/test';
4-
import { vi } from 'vitest';
4+
import MockDate from 'mockdate';
55
import DsDateInput from './ds-date-input';
66
import type { DsDateInputProps } from './ds-date-input.types';
77
import styles from './ds-date-input.stories.module.scss';
@@ -17,14 +17,12 @@ const meta: Meta<typeof DsDateInput> = {
1717
layout: 'centered',
1818
},
1919
beforeEach: () => {
20-
vi.useFakeTimers({
21-
// needed,
22-
shouldAdvanceTime: true,
23-
});
24-
vi.setSystemTime(MOCK_DATE);
20+
// We use mockdate here and not vi.useFakeTimers() because the latter is not compatible with Storybook.
21+
// See https://github.com/storybookjs/storybook/issues/31400#issuecomment-2943382690 for more details.
22+
MockDate.set(MOCK_DATE);
2523

2624
return () => {
27-
vi.useRealTimers();
25+
MockDate.reset();
2826
};
2927
},
3028
};

packages/design-system/src/components/ds-icon/custom-icons/Lego.svg

Lines changed: 0 additions & 11 deletions
This file was deleted.

pnpm-lock.yaml

Lines changed: 11 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)