Skip to content
5 changes: 3 additions & 2 deletions cypress/component/ContentReferenceWidget.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ describe('ContentReferenceWidget', () => {
cy.reply('**/index.php/apps/tables/row/*', rowData)
})

// Click the edit button on the first row
cy.get('@rows').first().find('td.sticky button').click({ force: true })
// Open the row action menu on the first row, then click Edit
cy.get('@rows').first().find('[data-cy="rowActionMenu"] button').click({ force: true })
cy.get('[data-cy="editRowBtn"]').click()

// Get the first field of the Edit Row modal
cy.get('.modal__content').as('editRowModal')
Expand Down
5 changes: 3 additions & 2 deletions cypress/e2e/helpers/viewFilteringSelectionSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ const addRow = (title, selection, multiSelection, checked) => {

cy.get('[data-cy="createRowSaveButton"]').click()
cy.get('[data-cy="createRowModal"]').should('not.exist')
cy.get('.toastify.toast-success').should('be.visible')
cy.get('.toastify.toast-success .toast-close').click({ multiple: true })
cy.get('body').then($body => {
$body.find('.toastify.toast-success .toast-close').each((_, el) => el.click())
})
}
9 changes: 6 additions & 3 deletions cypress/e2e/view-filtering-selection-row-removal.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,19 @@ describe('Filtering view with row removal', () => {

it('Removes rows from the filtered view once they no longer match', () => {
cy.intercept({ method: 'PUT', url: '**/apps/tables/row/*' }).as('updateCheckedRow')
cy.contains('[data-cy="ncTable"] [data-cy="customTableRow"]', 'first row').closest('[data-cy="customTableRow"]').find('[data-cy="editRowBtn"]').click()
cy.contains('[data-cy="ncTable"] [data-cy="customTableRow"]', 'first row').closest('[data-cy="customTableRow"]').find('[data-cy="rowActionMenu"] button').click()
cy.get('[data-cy="editRowBtn"]').click()
cy.get('[data-cy="editRowModal"] .checkbox-radio-switch').click()
cy.get('[data-cy="editRowSaveButton"]').click()
cy.wait('@updateCheckedRow')
cy.contains('[data-cy="ncTable"] [data-cy="customTableRow"]', 'first row').should('not.exist')
// Wait for the row to be removed from the filtered view (async removal)
cy.contains('[data-cy="ncTable"] [data-cy="customTableRow"]', 'first row', { timeout: 8000 }).should('not.exist')
cy.get('[data-cy="editRowModal"]').should('not.exist')

cy.intercept({ method: 'PUT', url: '**/apps/tables/row/*' }).as('inlineUpdateRow')
cy.contains('[data-cy="ncTable"] [data-cy="customTableRow"]', 'second row').closest('[data-cy="customTableRow"]').find('.inline-editing-container input').click({ force: true })
cy.wait('@inlineUpdateRow')
cy.contains('[data-cy="ncTable"] [data-cy="customTableRow"]', 'second row').should('not.exist')
// Wait for the row to be removed from the filtered view (async removal)
cy.contains('[data-cy="ncTable"] [data-cy="customTableRow"]', 'second row', { timeout: 8000 }).should('not.exist')
})
})
4 changes: 2 additions & 2 deletions lib/Service/RowService.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public function create(?int $tableId, ?int $viewId, RowDataInput|array $data, ?s
if ($userId) {
$this->userId = $userId;
}
if ($this->userId === null || $this->userId === '') {
if ($this->userId === null || ($this->userId === '' && !$this->isPublicContext)) {
$e = new \Exception('No user id in context, but needed.');
$this->logger->error($e->getMessage(), ['exception' => $e]);
throw new InternalError(get_class($this) . ' - ' . __FUNCTION__ . ': ' . $e->getMessage());
Expand Down Expand Up @@ -571,7 +571,7 @@ public function updateSet(
if ($userId) {
$this->userId = $userId;
}
if ($this->userId === null || $this->userId === '') {
if ($this->userId === null || ($this->userId === '' && !$this->isPublicContext)) {
$e = new \Exception('No user id in context, but needed.');
$this->logger->error($e->getMessage(), ['exception' => $e]);
throw new InternalError(get_class($this) . ' - ' . __FUNCTION__ . ': ' . $e->getMessage());
Expand Down
3 changes: 3 additions & 0 deletions lib/Service/SuperService.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class SuperService {

protected ?string $userId;

protected bool $isPublicContext = false;

public function __construct(LoggerInterface $logger, ?string $userId, PermissionsService $permissionsService) {
$this->permissionsService = $permissionsService;
$this->logger = $logger;
Expand All @@ -24,6 +26,7 @@ public function __construct(LoggerInterface $logger, ?string $userId, Permission

public function setPublicContext(): void {
$this->userId = '';
$this->isPublicContext = true;
$this->permissionsService->setPublicContext();
}
}
9 changes: 5 additions & 4 deletions playwright/e2e/column-datetime.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import { test, expect } from '../support/fixtures'
import { createDatetimeColumn, createTable, loadTable, removeColumn } from '../support/commands'
import { createDatetimeColumn, createTable, loadTable, openRowActionMenu, removeColumn } from '../support/commands'

const columnTitle = 'date and time'
const tableTitle = 'Test datetime'
Expand Down Expand Up @@ -32,9 +32,10 @@ test.describe('Test column ' + columnTitle, () => {
await expect(page.locator('.custom-table table tr td div').filter({ hasText: '5:15' }).first()).toBeVisible()

// delete row
await page.locator('.NcTable tr td button').first().click()
await page.locator('button').filter({ hasText: 'Delete' }).click()
await page.locator('button').filter({ hasText: /I really/ }).click({ force: true })
await openRowActionMenu(page, page.locator('[data-cy="customTableRow"]').first())
await page.locator('[data-cy="deleteRowBtn"]').click()
await page.locator('[data-cy="confirmDialog"]').getByRole('button', { name: 'Confirm' }).click()
await expect(page.locator('[data-cy="customTableRow"]')).toHaveCount(0, { timeout: 10000 })

await removeColumn(page, columnTitle)
})
Expand Down
9 changes: 5 additions & 4 deletions playwright/e2e/column-datetimeDate.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import { test, expect } from '../support/fixtures'
import { createDatetimeDateColumn, createTable, loadTable, removeColumn } from '../support/commands'
import { createDatetimeDateColumn, createTable, loadTable, openRowActionMenu, removeColumn } from '../support/commands'

const columnTitle = 'date'
const tableTitle = 'Test datetimeDate'
Expand All @@ -29,9 +29,10 @@ test.describe('Test column ' + columnTitle, () => {
await expect(page.locator('.custom-table table tr td div').filter({ hasText: '2023' }).first()).toBeVisible()

// delete row
await page.locator('.NcTable tr td button').first().click()
await page.locator('button').filter({ hasText: 'Delete' }).click()
await page.locator('button').filter({ hasText: /I really/ }).click({ force: true })
await openRowActionMenu(page, page.locator('[data-cy="customTableRow"]').first())
await page.locator('[data-cy="deleteRowBtn"]').click()
await page.locator('[data-cy="confirmDialog"]').getByRole('button', { name: 'Confirm' }).click()
await expect(page.locator('[data-cy="customTableRow"]')).toHaveCount(0, { timeout: 10000 })

await removeColumn(page, columnTitle)
})
Expand Down
9 changes: 5 additions & 4 deletions playwright/e2e/column-datetimeTime.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import { test, expect } from '../support/fixtures'
import { createDatetimeTimeColumn, createTable, loadTable, removeColumn } from '../support/commands'
import { createDatetimeTimeColumn, createTable, loadTable, openRowActionMenu, removeColumn } from '../support/commands'

const columnTitle = 'time'
const tableTitle = 'Test datetimeTime'
Expand All @@ -27,9 +27,10 @@ test.describe('Test column ' + columnTitle, () => {
await expect(page.locator('.custom-table table tr td div').filter({ hasText: '5:15' }).first()).toBeVisible()

// delete row
await page.locator('.NcTable tr td button').first().click()
await page.locator('button').filter({ hasText: 'Delete' }).click()
await page.locator('button').filter({ hasText: /I really/ }).click({ force: true })
await openRowActionMenu(page, page.locator('[data-cy="customTableRow"]').first())
await page.locator('[data-cy="deleteRowBtn"]').click()
await page.locator('[data-cy="confirmDialog"]').getByRole('button', { name: 'Confirm' }).click()
await expect(page.locator('[data-cy="customTableRow"]')).toHaveCount(0, { timeout: 10000 })

await removeColumn(page, columnTitle)
})
Expand Down
16 changes: 9 additions & 7 deletions playwright/e2e/column-number.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import { test, expect } from '../support/fixtures'
import { createNumberColumn, createTable, loadTable, removeColumn } from '../support/commands'
import { createNumberColumn, createTable, loadTable, openRowActionMenu, removeColumn } from '../support/commands'

const columnTitle = 'num1'
const tableTitle = 'Test number column'
Expand All @@ -26,9 +26,10 @@ test.describe('Test column number', () => {
await expect(page.locator('.custom-table table tr td div').filter({ hasText: '21.00' }).first()).toBeVisible()

// delete row
await page.locator('.NcTable tr td button').first().click()
await page.locator('button').filter({ hasText: 'Delete' }).click()
await page.locator('button').filter({ hasText: /I really/ }).click({ force: true })
await openRowActionMenu(page, page.locator('[data-cy="customTableRow"]').first())
await page.locator('[data-cy="deleteRowBtn"]').click()
await page.locator('[data-cy="confirmDialog"]').getByRole('button', { name: 'Confirm' }).click()
await expect(page.locator('[data-cy="customTableRow"]')).toHaveCount(0, { timeout: 10000 })

// insert row with float value
await page.locator('button').filter({ hasText: 'Create row' }).click()
Expand All @@ -38,9 +39,10 @@ test.describe('Test column number', () => {
await expect(page.locator('.custom-table table tr td div').filter({ hasText: '21.30' }).first()).toBeVisible()

// delete row
await page.locator('.NcTable tr td button').first().click()
await page.locator('button').filter({ hasText: 'Delete' }).click()
await page.locator('button').filter({ hasText: /I really/ }).click({ force: true })
await openRowActionMenu(page, page.locator('[data-cy="customTableRow"]').first())
await page.locator('[data-cy="deleteRowBtn"]').click()
await page.locator('[data-cy="confirmDialog"]').getByRole('button', { name: 'Confirm' }).click()
await expect(page.locator('[data-cy="customTableRow"]')).toHaveCount(0, { timeout: 10000 })

await removeColumn(page, columnTitle)
})
Expand Down
21 changes: 12 additions & 9 deletions playwright/e2e/column-selection-multi.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import { test, expect } from '../support/fixtures'
import { createSelectionMultiColumn, createTable, loadTable, removeColumn } from '../support/commands'
import { createSelectionMultiColumn, createTable, loadTable, openRowActionMenu, removeColumn } from '../support/commands'

const columnTitle = 'multi selection'
const tableTitle = 'Test number column'
Expand Down Expand Up @@ -42,15 +42,17 @@ test.describe('Test column ' + columnTitle, () => {
await expect(page.locator('.custom-table table tr td .cell-multi-selection').filter({ hasText: 'third option' }).first()).toBeVisible()

// delete first row
await page.locator('.NcTable tr td button').first().click()
await page.locator('button').filter({ hasText: 'Delete' }).click()
await page.locator('button').filter({ hasText: /I really/ }).click({ force: true })
await openRowActionMenu(page, page.locator('[data-cy="customTableRow"]').first())
await page.locator('[data-cy="deleteRowBtn"]').click()
await page.locator('[data-cy="confirmDialog"]').getByRole('button', { name: 'Confirm' }).click()
await expect(page.locator('[data-cy="customTableRow"]')).toHaveCount(1, { timeout: 10000 })

await expect(page.locator('.custom-table table tr td .cell-multi-selection', { hasText: 'first option' })).toBeHidden()
await expect(page.locator('.custom-table table tr td .cell-multi-selection', { hasText: 'second option' })).toBeHidden()

// edit second row (which is now first row)
await page.locator('.NcTable tr td button').first().click()
await openRowActionMenu(page, page.locator('[data-cy="customTableRow"]').first())
await page.locator('[data-cy="editRowBtn"]').click()
await page.locator('.modal__content .slot input').first().click()
await page.locator('ul.vs__dropdown-menu li span[title="first option"]').first().click()
await page.locator('.modal__content .title').first().click()
Expand All @@ -60,9 +62,10 @@ test.describe('Test column ' + columnTitle, () => {
await expect(page.locator('.custom-table table tr td .cell-multi-selection').filter({ hasText: 'third option' }).first()).toBeVisible()

// delete first row
await page.locator('.NcTable tr td button').first().click()
await page.locator('button').filter({ hasText: 'Delete' }).click()
await page.locator('button').filter({ hasText: /I really/ }).click({ force: true })
await openRowActionMenu(page, page.locator('[data-cy="customTableRow"]').first())
await page.locator('[data-cy="deleteRowBtn"]').click()
await page.locator('[data-cy="confirmDialog"]').getByRole('button', { name: 'Confirm' }).click()
await expect(page.locator('[data-cy="customTableRow"]')).toHaveCount(0, { timeout: 10000 })

await removeColumn(page, columnTitle)
})
Expand All @@ -79,6 +82,6 @@ test.describe('Test column ' + columnTitle, () => {
await page.locator('button').filter({ hasText: 'Save' }).click()

await expect(page.locator('.custom-table table tr td .cell-multi-selection').first()).toBeVisible()
await expect(page.locator('.NcTable tr td button').first()).toBeVisible()
await expect(page.locator('[data-cy="customTableRow"]').first()).toBeVisible()
})
})
8 changes: 5 additions & 3 deletions playwright/e2e/column-selection.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import { test, expect } from '../support/fixtures'
import { createSelectionColumn, createTable, deleteTable, loadTable } from '../support/commands'
import { createSelectionColumn, createTable, deleteTable, loadTable, openRowActionMenu } from '../support/commands'

const columnTitle = 'single selection'
const tableTitle = 'Test number column'
Expand Down Expand Up @@ -37,7 +37,9 @@ test.describe('Test column ' + columnTitle, () => {
await expect(page.locator('[data-cy="ncTable"] tr td div').filter({ hasText: 'third option' }).first()).toBeVisible()

// edit the explicitly created row
await page.locator('[data-cy="ncTable"] [data-cy="customTableRow"]:has-text("👋 third option")').locator('[data-cy="editRowBtn"]').click()
const thirdOptionRow = page.locator('[data-cy="ncTable"] [data-cy="customTableRow"]').filter({ hasText: '👋 third option' }).first()
await openRowActionMenu(page, thirdOptionRow)
await page.locator('[data-cy="editRowBtn"]').click()
await page.locator('[data-cy="editRowModal"] .slot input').first().click()
await page.locator('ul.vs__dropdown-menu li span[title="first option"]').first().click()
await page.locator('[data-cy="editRowSaveButton"]').click()
Expand All @@ -59,6 +61,6 @@ test.describe('Test column ' + columnTitle, () => {
await page.locator('[data-cy="createRowSaveButton"]').click()

await expect(page.locator('[data-cy="ncTable"] tr td div').first()).toBeVisible()
await expect(page.locator('[data-cy="ncTable"] [data-cy="editRowBtn"]').first()).toBeVisible()
await expect(page.locator('[data-cy="ncTable"] [data-cy="customTableRow"]').first()).toBeVisible()
})
})
6 changes: 4 additions & 2 deletions playwright/e2e/column-text-link.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as fs from 'fs'
import * as path from 'path'
import { fileURLToPath } from 'url'
import { uploadFile } from '../support/api'
import { createTable, createTextLinkColumn, loadTable } from '../support/commands'
import { createTable, createTextLinkColumn, loadTable, openRowActionMenu } from '../support/commands'
const __dirname = path.dirname(fileURLToPath(import.meta.url))

test.describe('Test column text-link', () => {
Expand Down Expand Up @@ -44,7 +44,9 @@ test.describe('Test column text-link', () => {
await expect(page.locator('tr td a').filter({ hasText: 'nextcloud' }).first()).toBeVisible()
await expect(page.locator('tr td a').filter({ hasText: 'NC_server_test' }).first()).toBeVisible()

await page.locator('[data-cy="ncTable"] [data-cy="editRowBtn"]').first().click({ force: true })
const firstRow = page.locator('[data-cy="ncTable"] [data-cy="customTableRow"]').first()
await openRowActionMenu(page, firstRow)
await page.locator('[data-cy="editRowBtn"]').click()
const editDialog = page.getByRole('dialog', { name: 'Edit row' })
await editDialog.waitFor({ state: 'visible' })

Expand Down
6 changes: 4 additions & 2 deletions playwright/e2e/column-usergroup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { test, expect } from '../support/fixtures'
import { createRandomUser } from '../support/api'
import { createTable, createUsergroupColumn, loadTable } from '../support/commands'
import { createTable, createUsergroupColumn, loadTable, openRowActionMenu } from '../support/commands'

const columnTitle = 'usergroup'
const tableTitlePrefix = 'Test usergroup'
Expand Down Expand Up @@ -59,7 +59,9 @@
await page.locator('[data-cy="createRowSaveButton"]').click()
await expect(page.locator('[data-cy="ncTable"] table tr td .user-bubble__name').filter({ hasText: user.userId }).first()).toBeVisible()

await page.locator('[data-cy="ncTable"] [data-cy="editRowBtn"]').first().click()
const firstRow = page.locator('[data-cy="ncTable"] [data-cy="customTableRow"]').first()
await openRowActionMenu(page, firstRow)
await page.locator('[data-cy="editRowBtn"]').click()
// deselect all
const deselectButtons = await page.locator('[data-cy="usergroupRowSelect"] .vs__deselect').all()
for (const button of deselectButtons) {
Expand All @@ -71,7 +73,7 @@
await page.locator(`.vs__dropdown-menu [id="${nonLocalUser.userId}"]`).click()
await page.locator('[data-cy="editRowSaveButton"]').click()

await expect(page.locator('[data-cy="ncTable"] table tr td .user-bubble__name', { hasText: user.userId })).toBeHidden()

Check failure on line 76 in playwright/e2e/column-usergroup.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright (master)

[chromium] › playwright/e2e/column-usergroup.spec.ts:49:2 › Test column usergroup › Create and edit rows

1) [chromium] › playwright/e2e/column-usergroup.spec.ts:49:2 › Test column usergroup › Create and edit rows Error: expect(locator).toBeHidden() failed Locator: locator('[data-cy="ncTable"] table tr td .user-bubble__name').filter({ hasText: 'user_1779134981346_7g09rxu0' }) Expected: hidden Received: visible Timeout: 5000ms Call log: - Expect "toBeHidden" with timeout 5000ms - waiting for locator('[data-cy="ncTable"] table tr td .user-bubble__name').filter({ hasText: 'user_1779134981346_7g09rxu0' }) 9 × locator resolved to <span data-v-7942d6b6="" class="user-bubble__name"> user_1779134981346_7g09rxu0 </span> - unexpected value "visible" 74 | await page.locator('[data-cy="editRowSaveButton"]').click() 75 | > 76 | await expect(page.locator('[data-cy="ncTable"] table tr td .user-bubble__name', { hasText: user.userId })).toBeHidden() | ^ 77 | await expect(page.locator('[data-cy="ncTable"] table tr td .user-bubble__name').filter({ hasText: nonLocalUser.userId }).first()).toBeVisible() 78 | }) 79 | }) at /home/runner/work/tables/tables/playwright/e2e/column-usergroup.spec.ts:76:110

Check failure on line 76 in playwright/e2e/column-usergroup.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright (stable33)

[chromium] › playwright/e2e/column-usergroup.spec.ts:49:2 › Test column usergroup › Create and edit rows

1) [chromium] › playwright/e2e/column-usergroup.spec.ts:49:2 › Test column usergroup › Create and edit rows Error: expect(locator).toBeHidden() failed Locator: locator('[data-cy="ncTable"] table tr td .user-bubble__name').filter({ hasText: 'user_1779134968367_l450qgut' }) Expected: hidden Received: visible Timeout: 5000ms Call log: - Expect "toBeHidden" with timeout 5000ms - waiting for locator('[data-cy="ncTable"] table tr td .user-bubble__name').filter({ hasText: 'user_1779134968367_l450qgut' }) 9 × locator resolved to <span data-v-7942d6b6="" class="user-bubble__name"> user_1779134968367_l450qgut </span> - unexpected value "visible" 74 | await page.locator('[data-cy="editRowSaveButton"]').click() 75 | > 76 | await expect(page.locator('[data-cy="ncTable"] table tr td .user-bubble__name', { hasText: user.userId })).toBeHidden() | ^ 77 | await expect(page.locator('[data-cy="ncTable"] table tr td .user-bubble__name').filter({ hasText: nonLocalUser.userId }).first()).toBeVisible() 78 | }) 79 | }) at /home/runner/work/tables/tables/playwright/e2e/column-usergroup.spec.ts:76:110
await expect(page.locator('[data-cy="ncTable"] table tr td .user-bubble__name').filter({ hasText: nonLocalUser.userId }).first()).toBeVisible()
})
})
9 changes: 6 additions & 3 deletions playwright/e2e/context.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
loadContext,
loadTable,
openContextEditModal,
openRowActionMenu,
} from '../support/commands'
import { login } from '../support/login'

Expand Down Expand Up @@ -185,7 +186,7 @@
await deleteResponse

// Wait for the navigation item to be hidden
await expect(page.locator('[data-cy="navigationContextItem"]').filter({ hasText: contextTitle })).toBeHidden({ timeout: 15000 })

Check failure on line 189 in playwright/e2e/context.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright (stable33)

[chromium] › playwright/e2e/context.spec.ts:159:2 › Manage a context › Delete context with shares

2) [chromium] › playwright/e2e/context.spec.ts:159:2 › Manage a context › Delete context with shares Error: expect(locator).toBeHidden() failed Locator: locator('[data-cy="navigationContextItem"]').filter({ hasText: 'test application delete' }) Expected: hidden Received: visible Timeout: 15000ms Call log: - Expect "toBeHidden" with timeout 15000ms - waiting for locator('[data-cy="navigationContextItem"]').filter({ hasText: 'test application delete' }) 19 × locator resolved to <li data-v-bcb47ab4="" data-v-59e96255="" data-v-058e6060="" id="app-navigation-item-cdaxi" data-cy="navigationContextItem" class="app-navigation-entry-wrapper active">…</li> - unexpected value "visible" 187 | 188 | // Wait for the navigation item to be hidden > 189 | await expect(page.locator('[data-cy="navigationContextItem"]').filter({ hasText: contextTitle })).toBeHidden({ timeout: 15000 }) | ^ 190 | await expect(page.locator('h1').filter({ hasText: contextTitle })).toBeHidden() 191 | 192 | // verify that context was deleted from shared user at /home/runner/work/tables/tables/playwright/e2e/context.spec.ts:189:101
await expect(page.locator('h1').filter({ hasText: contextTitle })).toBeHidden()

// verify that context was deleted from shared user
Expand Down Expand Up @@ -300,9 +301,11 @@

await expect(page.locator('[data-cy="ncTable"] table').filter({ hasText: 'first row' })).toBeVisible()

await page.locator('[data-cy="ncTable"] [data-cy="customTableRow"]').filter({ hasText: 'first row' }).locator('[data-cy="editRowBtn"]').click()
await page.locator('[data-cy="editRowDeleteButton"]').click()
await page.locator('[data-cy="editRowDeleteConfirmButton"]').click()
const firstRow = page.locator('[data-cy="ncTable"] [data-cy="customTableRow"]').filter({ hasText: 'first row' }).first()
await openRowActionMenu(page, firstRow)
await page.locator('[data-cy="deleteRowBtn"]').click()
await page.locator('[data-cy="confirmDialog"]').getByRole('button', { name: 'Confirm' }).click()
await page.locator('[data-cy="confirmDialog"]').waitFor({ state: 'hidden', timeout: 10000 }).catch(() => {})

await expect(page.locator('[data-cy="ncTable"] table', { hasText: 'first row' })).toBeHidden()
})
Expand Down
Loading
Loading