Browse Source

fix: PW for add new row button changes

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/5805/head
Raju Udava 2 years ago
parent
commit
9415ae0438
  1. 7
      packages/nc-gui/components/smartsheet/Grid.vue
  2. 5
      tests/playwright/pages/Dashboard/Grid/index.ts

7
packages/nc-gui/components/smartsheet/Grid.vue

@ -1097,7 +1097,12 @@ function addEmptyRow(row?: number) {
</a-dropdown>
</div>
<div v-if="isAddingEmptyRowAllowed" class="absolute bottom-1px left-2 z-4" @click="addEmptyRow()">
<div
v-if="isAddingEmptyRowAllowed"
class="absolute bottom-1px left-2 z-4"
data-testid="nc-grid-add-new-row"
@click="addEmptyRow()"
>
<a-button v-e="['c:row:add:grid-bottom', { footer: true }]" class="!rounded-xl" size="small">
<div class="flex items-center">
<component :is="iconMap.plus" class="text-pint-500 text-xs" />

5
tests/playwright/pages/Dashboard/Grid/index.ts

@ -77,8 +77,9 @@ export class GridPage extends BasePage {
if (index !== 0) await this.get().locator('.nc-grid-row').nth(0).waitFor({ state: 'attached' });
const rowCount = await this.get().locator('.nc-grid-row').count();
await (await this.get().locator('.nc-grid-add-new-cell').elementHandle())?.waitForElementState('stable');
await this.get().locator('.nc-grid-add-new-cell').click();
const addNewRowButton: Locator = await this.rootPage.locator(`[data-testid="nc-grid-add-new-row"]`);
await addNewRowButton.waitFor({ state: 'visible' });
await addNewRowButton.click();
await expect(await this.get().locator('.nc-grid-row')).toHaveCount(rowCount + 1);

Loading…
Cancel
Save