# Instructions

- Following Playwright test failed.
- Explain why, be concise, respect Playwright best practices.
- Provide a snippet of code with the fix, if possible.

# Test info

- Name: src/manager/tests/e2e/product/product-recurring-edit-booking-plans-prices.spec.ts >> decreases the price of all booking plans
- Location: src/manager/tests/e2e/product/product-recurring-edit-booking-plans-prices.spec.ts:9:7

# Error details

```
Error: expect(locator).toBeHidden() failed

Locator:  getByTestId('app-page').getByTestId('app-page-content').locator('[data-test-id=app-details-card]:has([data-test-id=title]:has-text("Booking plan"))').locator('.ui-data-grid').getByTestId('ui-data-grid-header-operations')
Expected: hidden
Received: visible
Timeout:  30000ms

Call log:
  - Expect "toBeHidden" with timeout 30000ms
  - waiting for getByTestId('app-page').getByTestId('app-page-content').locator('[data-test-id=app-details-card]:has([data-test-id=title]:has-text("Booking plan"))').locator('.ui-data-grid').getByTestId('ui-data-grid-header-operations')
    64 × locator resolved to <th data-v-0ab2f469="" data-test-id="ui-data-grid-header-operations" class="h-[52px] break-words border-b border-black/20 text-left text-xs font-semibold text-black/80">…</th>
       - unexpected value "visible"

```

```yaml
- columnheader
```

# Test source

```ts
  1  | import { BookingPlan } from '@/shared/types/booking-plan-types';
  2  | import { DataTable } from '@/manager/modules/ui/data-table/components/DataTable';
  3  | import { bookingPlanTableColumnTestIds } from '@/manager/modules/ui/data-table/data/data-table-column-test-ids';
  4  | import { expectSingleLocatorToHaveText } from '@/manager/shared/utils/expect-utils';
  5  | import { formatBillingPeriod, formatCurrencyWithExtendedPrecision, formatPercentage } from '@/shared/utils/formatters';
  6  | import { decreaseByPercentage } from '@/shared/utils/math-utils';
  7  | import { expect } from '@playwright/test';
  8  | 
  9  | type BookingPlansTableVariant = 'unitType' | 'insurance' | 'recurringProduct';
  10 | 
  11 | export async function verifyBookingPlansTable(
  12 |   table: DataTable,
  13 |   plans: BookingPlan[],
  14 |   currency: string,
  15 |   variant: BookingPlansTableVariant
  16 | ): Promise<void> {
  17 |   const hidesNameColumn = variant === 'insurance' || variant === 'recurringProduct';
  18 |   const orderedPlans = [...plans].reverse();
  19 |   const defaultVisiblePlans = 5;
  20 |   const maxVisiblePlans = 25;
  21 | 
  22 |   if (plans.length > defaultVisiblePlans) {
  23 |     await table.selectRowsPerPage(maxVisiblePlans);
  24 |   }
  25 | 
  26 |   await expect(table.getRows()).toHaveCount(Math.min(plans.length, maxVisiblePlans));
  27 | 
> 28 |   await expect(table.getColumnheader(bookingPlanTableColumnTestIds.operations)).toBeHidden();
     |                                                                                 ^ Error: expect(locator).toBeHidden() failed
  29 | 
  30 |   for (let index = 0; index < orderedPlans.length; index++) {
  31 |     const plan = orderedPlans[index];
  32 |     const priceExclVat = plan.discount ? decreaseByPercentage(plan.priceExclVat, plan.discount) : plan.priceExclVat;
  33 |     const periodPriceExclVat = priceExclVat * plan.amount;
  34 | 
  35 |     if (hidesNameColumn) {
  36 |       await expect(table.getColumn(bookingPlanTableColumnTestIds.name)).toBeHidden();
  37 |     } else {
  38 |       await expectSingleLocatorToHaveText(
  39 |         table.getRowColumnByIndex(index, bookingPlanTableColumnTestIds.name),
  40 |         plan.name
  41 |       );
  42 |     }
  43 | 
  44 |     await expectSingleLocatorToHaveText(
  45 |       table.getRowColumnByIndex(index, bookingPlanTableColumnTestIds.billingPeriod),
  46 |       formatBillingPeriod(plan.period, plan.amount)
  47 |     );
  48 |     await expectSingleLocatorToHaveText(
  49 |       table.getRowColumnByIndex(index, bookingPlanTableColumnTestIds.discount),
  50 |       formatPercentage(plan.discount ?? 0)
  51 |     );
  52 |     await expectSingleLocatorToHaveText(
  53 |       table.getRowColumnByIndex(index, bookingPlanTableColumnTestIds.priceExclVat),
  54 |       formatCurrencyWithExtendedPrecision(priceExclVat, currency)
  55 |     );
  56 |     await expectSingleLocatorToHaveText(
  57 |       table.getRowColumnByIndex(index, bookingPlanTableColumnTestIds.periodPriceExclVat),
  58 |       formatCurrencyWithExtendedPrecision(periodPriceExclVat, currency)
  59 |     );
  60 |     await expectSingleLocatorToHaveText(
  61 |       table.getRowColumnByIndex(index, bookingPlanTableColumnTestIds.status),
  62 |       plan.publish ? 'published' : 'unpublished'
  63 |     );
  64 | 
  65 |     await expect(table.getRowColumnByIndex(index, bookingPlanTableColumnTestIds.activeBookings)).toBeVisible();
  66 |   }
  67 | }
  68 | 
```