Merge remote-tracking branch 'origin/main'

This commit is contained in:
Hosted Weblate
2026-01-08 09:53:58 +01:00

View File

@@ -38,12 +38,9 @@ test.describe('Date Picker Tests', () => {
test('should load correct today when in a different timezone', async ({page}) => {
await page.clock.setFixedTime(new Date('2017-02-02T00:30:00'));
const responsePromise = page.waitForResponse('**/timeline/content/range?startDate=2017-02-02&endDate=2017-02-02&timezone=Europe%2FBerlin');
await page.getByRole('button', { name: 'Today' }).click()
await expect(page.locator('div').filter({ hasText: 'Thu2Feb' }).nth(2)).toContainClass('selected');
const response = await responsePromise;
expect(response.status()).toBe(200);
await expect(page).toHaveURL(/startDate=2017-02-02&endDate=2017-02-02/);
})
test('should load correct date when in a different timezone at start of day', async ({page}) => {
@@ -51,26 +48,16 @@ test.describe('Date Picker Tests', () => {
await page.getByText('Wed20Dec').click()
await expect(page.locator('div').filter({ hasText: 'Wed20Dec' }).nth(2)).toContainClass('selected');
const responsePromise = page.waitForResponse('**/timeline/content/range?startDate=2017-12-20&endDate=2017-12-20&timezone=Europe%2FBerlin');
const response = await responsePromise;
expect(response.status()).toBe(200);
await expect(page.getByText('Dec 19 17:28 - 10:')).toBeVisible();
await expect(page).toHaveURL(/startDate=2017-12-20&endDate=2017-12-20/);
})
test('should load correct date when in a different timezone at end of day', async ({page}) => {
await page.clock.setFixedTime(new Date('2017-02-02T23:30:50'));
const responsePromise = page.waitForResponse('**/timeline/content/range?startDate=2017-12-20&endDate=2017-12-20&timezone=Europe%2FBerlin');
await page.getByText('Wed20Dec').click()
await expect(page.locator('div').filter({ hasText: 'Wed20Dec' }).nth(2)).toContainClass('selected');
const response = await responsePromise;
expect(response.status()).toBe(200);
await expect(page.getByText('Dec 19 17:28 - 10:')).toBeVisible();
await expect(page).toHaveURL(/startDate=2017-12-20&endDate=2017-12-20/);
})
});