Skip to content

Commit

Permalink
fix: test addNewRow required cell waitForResponse issue
Browse files Browse the repository at this point in the history
  • Loading branch information
rameshmane7218 committed Dec 19, 2023
1 parent 9140e6c commit c2af864
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions tests/playwright/pages/Dashboard/Grid/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,16 @@ export class GridPage extends BasePage {
);

await this.get().locator('.nc-grid-add-new-cell').click();
// Wait for to add new row
await addNewRowResponse;

const isRequiredCell = (await this.cell.get({ index, columnHeader }).getAttribute('class')).includes(
'nc-required-cell'
);

// The 'save row/insert row' API call will be skipped if the row contains the required cell.
if (!isRequiredCell) {
// Wait for to add new row
await addNewRowResponse;
}

const rowCount = index + 1;
await expect(this.get().locator('.nc-grid-row')).toHaveCount(rowCount);
Expand All @@ -137,7 +145,12 @@ export class GridPage extends BasePage {
);

await this._fillRow({ index, columnHeader, value: rowValue });
await updateCellResponse;

if (isRequiredCell) {
await addNewRowResponse;
} else {
await updateCellResponse;
}

await this.rootPage.keyboard.press('Escape');
await this.rootPage.waitForTimeout(300);
Expand Down

1 comment on commit c2af864

@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-20231219-1509

Please sign in to comment.