Skip to content

Commit

Permalink
fix: timezone playwright test fail issue
Browse files Browse the repository at this point in the history
  • Loading branch information
rameshmane7218 committed Dec 20, 2023
1 parent c7fcf70 commit 490232a
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions tests/playwright/tests/db/features/timezone.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect, test } from '@playwright/test';
import { DashboardPage } from '../../../pages/Dashboard';
import setup, { NcContext, unsetup } from '../../../setup';
import { Api, ProjectListType, UITypes } from 'nocodb-sdk';
import { Api, PaginatedType, ProjectListType, UITypes } from 'nocodb-sdk';
import { enableQuickRun, isEE, isMysql, isPg, isSqlite } from '../../../setup/db';
import { getKnexConfig } from '../../utils/config';
import { getBrowserTimezoneOffset } from '../../utils/general';
Expand Down Expand Up @@ -778,7 +778,11 @@ test.describe.serial('Timezone- ExtDB : DateTime column, Browser Timezone same a
// Hence, we skip seconds from API response
//

const records = await api.dbTableRow.list('noco', context.base.id, 'MyTable', { limit: 10 });
const records = (await api.dbTableRow.list('noco', context.base.id, 'MyTable', { limit: 10 })) as {
list: Record<string, any>[];
pageInfo: PaginatedType;
};
records.list = records.list.filter(record => record.DatetimeWithoutTz && record.DatetimeWithTz);
let dateTimeWithoutTz = records.list.map(record => record.DatetimeWithoutTz);
let dateTimeWithTz = records.list.map(record => record.DatetimeWithTz);

Expand Down Expand Up @@ -1082,7 +1086,11 @@ test.describe.serial('Timezone- ExtDB (MySQL Only) : DB Timezone configured as H
// Hence, we skip seconds from API response
//

const records = await api.dbTableRow.list('sakila', context.base.id, 'MyTable', { limit: 10 });
const records = (await api.dbTableRow.list('sakila', context.base.id, 'MyTable', { limit: 10 })) as {
list: Record<string, any>[];
pageInfo: PaginatedType;
};
records.list = records.list.filter(record => record.DatetimeWithoutTz && record.DatetimeWithTz);
let dateTimeWithoutTz = records.list.map(record => record.DatetimeWithoutTz);
let dateTimeWithTz = records.list.map(record => record.DatetimeWithTz);

Expand Down

1 comment on commit 490232a

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR changes have been deployed. Please run the following command to verify:

docker run -d -p 8888:8080 nocodb/nocodb-timely:0.202.10-pr-7218-20231220-1243

Please sign in to comment.