Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix(pw): metaLtar test update

Ramesh Mane706de25aa7f9
diff --git a/tests/playwright/pages/Dashboard/TreeView.ts b/tests/playwright/pages/Dashboard/TreeView.ts
index 7a8bf7e633..1c548c2813 100644
--- a/tests/playwright/pages/Dashboard/TreeView.ts
+++ b/tests/playwright/pages/Dashboard/TreeView.ts
@@ -237,7 +237,11 @@ export class TreeViewPage extends BasePage {
}
}
- async deleteTable({ title }: { title: string }) {
+ async deleteTable({ title, baseTitle }: { title: string; baseTitle?: string }) {
+ if (baseTitle) {
+ await this.dashboard.sidebar.baseNode.verifyActiveProject({ baseTitle, open: true });
+ }
+
const tableTitle = title.replace(/ /g, '');
await this.waitForTableOptions({ title });
@@ -260,7 +264,11 @@ export class TreeViewPage extends BasePage {
await (await this.rootPage.locator('.nc-container').last().elementHandle())?.waitForElementState('stable');
}
- async renameTable({ title, newTitle }: { title: string; newTitle: string }) {
+ async renameTable({ title, newTitle, baseTitle }: { title: string; newTitle: string; baseTitle?: string }) {
+ if (baseTitle) {
+ await this.dashboard.sidebar.baseNode.verifyActiveProject({ baseTitle, open: true });
+ }
+
const tableTitle = title.replace(/ /g, '');
await this.waitForTableOptions({ title });
diff --git a/tests/playwright/tests/db/features/metaLTAR.spec.ts b/tests/playwright/tests/db/features/metaLTAR.spec.ts
index 11bb741276..8835801849 100644
--- a/tests/playwright/tests/db/features/metaLTAR.spec.ts
+++ b/tests/playwright/tests/db/features/metaLTAR.spec.ts
@@ -61,6 +61,10 @@ test.describe.serial('Test table', () => {
await dashboard.rootPage.waitForTimeout(650);
await dashboard.rootPage.reload();
+
+ // wait for auto navigate to project completion
+ await dashboard.rootPage.waitForTimeout(2000);
+
await dashboard.treeView.openProject({ title: 'xcdb', context });
api = new Api({
@@ -219,6 +223,9 @@ test.describe.serial('Test table', () => {
// refresh page
await page.reload();
+ // wait for auto navigate to project completion
+ await dashboard.rootPage.waitForTimeout(2000);
+
const hiddenLinksTableColumns = [
{
tableName: 'Table1',
@@ -238,6 +245,8 @@ test.describe.serial('Test table', () => {
},
];
+ await dashboard.sidebar.baseNode.verifyActiveProject({ baseTitle: 'xcdb', open: true });
+
// Unhide links columns
for (const table of hiddenLinksTableColumns) {
await dashboard.treeView.openTable({ title: table.tableName });
@@ -289,6 +298,8 @@ test.describe.serial('Test table', () => {
});
test('Delete record - bulk, over UI', async () => {
+ await dashboard.sidebar.baseNode.verifyActiveProject({ baseTitle: 'xcdb', open: true });
+
await dashboard.treeView.openTable({ title: 'Table0' });
await grid.selectRow(0);
await grid.selectRow(1);
@@ -306,6 +317,8 @@ test.describe.serial('Test table', () => {
});
test('Delete column', async () => {
+ await dashboard.sidebar.baseNode.verifyActiveProject({ baseTitle: 'xcdb', open: true });
+
// has-many
await dashboard.treeView.openTable({ title: 'Table0' });
await dashboard.grid.column.delete({ title: 'TableA:hm:TableB' });
@@ -348,6 +361,8 @@ test.describe.serial('Test table', () => {
});
test('Delete table', async () => {
+ await dashboard.sidebar.baseNode.verifyActiveProject({ baseTitle: 'xcdb', open: true });
+
await dashboard.treeView.deleteTable({ title: 'Table0' });
await dashboard.treeView.verifyTable({ title: 'Table0', exists: false });
diff --git a/tests/playwright/tests/db/views/viewCalendar.spec.ts b/tests/playwright/tests/db/views/viewCalendar.spec.ts
index 49c0306e66..fd8288cca8 100644
--- a/tests/playwright/tests/db/views/viewCalendar.spec.ts
+++ b/tests/playwright/tests/db/views/viewCalendar.spec.ts
@@ -427,7 +427,7 @@ test.describe('Calendar View', () => {
await calendar.sideMenu.verifySideBarRecords({ records: Array(12).fill('') });
});
- test.only('Calendar Operations Date Fields', async () => {
+ test('Calendar Operations Date Fields', async () => {
await dashboard.treeView.openBase({ title: `xcdb${context.workerId}` });
await dashboard.treeView.openTable({ title: 'Social Media Calendar', baseTitle: `xcdb${context.workerId}` });