Browse Source

test: fix for bulk update to be EE feature

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/5977/head
Raju Udava 1 year ago
parent
commit
c6147440dc
  1. 32
      tests/playwright/tests/db/bulkUpdate.spec.ts

32
tests/playwright/tests/db/bulkUpdate.spec.ts

@ -4,6 +4,8 @@ import { DashboardPage } from '../../pages/Dashboard';
import { Api } from 'nocodb-sdk';
import { createDemoTable } from '../../setup/demoTable';
import { BulkUpdatePage } from '../../pages/Dashboard/BulkUpdate';
import { AccountLicensePage } from '../../pages/Account/License';
import { AccountPage } from '../../pages/Account';
let bulkUpdateForm: BulkUpdatePage;
async function updateBulkFields(fields) {
@ -31,6 +33,8 @@ test.describe('Bulk update', () => {
context = await setup({ page, isEmptyProject: true });
dashboard = new DashboardPage(page, context.project);
bulkUpdateForm = dashboard.bulkUpdateForm;
const accountPage: AccountPage = new AccountPage(page);
const accountLicensePage: AccountLicensePage = new AccountLicensePage(accountPage);
api = new Api({
baseURL: `http://localhost:8080/`,
@ -42,6 +46,10 @@ test.describe('Bulk update', () => {
table = await createDemoTable({ context, type: 'textBased', recordCnt: 50 });
await page.reload();
await accountLicensePage.goto();
await accountLicensePage.saveLicenseKey('1234567890');
await dashboard.goto();
await dashboard.treeView.openTable({ title: 'textBased' });
// Open bulk update form
@ -127,6 +135,8 @@ test.describe('Bulk update', () => {
context = await setup({ page, isEmptyProject: true });
dashboard = new DashboardPage(page, context.project);
bulkUpdateForm = dashboard.bulkUpdateForm;
const accountPage: AccountPage = new AccountPage(page);
const accountLicensePage: AccountLicensePage = new AccountLicensePage(accountPage);
api = new Api({
baseURL: `http://localhost:8080/`,
@ -138,6 +148,10 @@ test.describe('Bulk update', () => {
table = await createDemoTable({ context, type: 'numberBased', recordCnt: 50 });
await page.reload();
await accountLicensePage.goto();
await accountLicensePage.saveLicenseKey('1234567890');
await dashboard.goto();
await dashboard.treeView.openTable({ title: 'numberBased' });
// Open bulk update form
@ -197,6 +211,8 @@ test.describe('Bulk update', () => {
context = await setup({ page, isEmptyProject: true });
dashboard = new DashboardPage(page, context.project);
bulkUpdateForm = dashboard.bulkUpdateForm;
const accountPage: AccountPage = new AccountPage(page);
const accountLicensePage: AccountLicensePage = new AccountLicensePage(accountPage);
api = new Api({
baseURL: `http://localhost:8080/`,
@ -208,6 +224,10 @@ test.describe('Bulk update', () => {
table = await createDemoTable({ context, type: 'selectBased', recordCnt: 50 });
await page.reload();
await accountLicensePage.goto();
await accountLicensePage.saveLicenseKey('1234567890');
await dashboard.goto();
await dashboard.treeView.openTable({ title: 'selectBased' });
// Open bulk update form
@ -260,6 +280,8 @@ test.describe('Bulk update', () => {
context = await setup({ page, isEmptyProject: true });
dashboard = new DashboardPage(page, context.project);
bulkUpdateForm = dashboard.bulkUpdateForm;
const accountPage: AccountPage = new AccountPage(page);
const accountLicensePage: AccountLicensePage = new AccountLicensePage(accountPage);
api = new Api({
baseURL: `http://localhost:8080/`,
@ -271,6 +293,10 @@ test.describe('Bulk update', () => {
table = await createDemoTable({ context, type: 'miscellaneous', recordCnt: 50 });
await page.reload();
await accountLicensePage.goto();
await accountLicensePage.saveLicenseKey('1234567890');
await dashboard.goto();
await dashboard.treeView.openTable({ title: 'miscellaneous' });
// Open bulk update form
@ -323,6 +349,8 @@ test.describe('Bulk update', () => {
context = await setup({ page, isEmptyProject: true });
dashboard = new DashboardPage(page, context.project);
bulkUpdateForm = dashboard.bulkUpdateForm;
const accountPage: AccountPage = new AccountPage(page);
const accountLicensePage: AccountLicensePage = new AccountLicensePage(accountPage);
api = new Api({
baseURL: `http://localhost:8080/`,
@ -334,6 +362,10 @@ test.describe('Bulk update', () => {
table = await createDemoTable({ context, type: 'dateTimeBased', recordCnt: 50 });
await page.reload();
await accountLicensePage.goto();
await accountLicensePage.saveLicenseKey('1234567890');
await dashboard.goto();
await dashboard.treeView.openTable({ title: 'dateTimeBased' });
// Open bulk update form

Loading…
Cancel
Save