fix(playwright): skip real time test (#52834)

This commit is contained in:
Huyen Nguyen
2023-12-31 03:10:54 +07:00
committed by GitHub
parent 41f4725cd1
commit a90a37c494
2 changed files with 35 additions and 4 deletions
+6 -1
View File
@@ -109,7 +109,12 @@ test.describe('Profile component', () => {
await expect(page.getByText('Number of points: 1')).toBeVisible();
});
test('renders the heat map correctly', async ({ page }) => {
// The date range computation in this test doesn't match the implementation code,
// and causes the test to fail in some cases.
// We would want to mock system time to keep the test stable,
// but Playwright currently doesn't offer a built-in mechanism for this.
// Ref: https://github.com/microsoft/playwright/issues/6347
test.skip('renders the heat map correctly', async ({ page }) => {
const today = new Date();
const currentMonth = today.toLocaleString('en-US', { month: 'short' });
const sixMonthsAgo = new Date(today.setMonth(today.getMonth() - 6));