import { test, expect } from '@playwright/test';

test.describe('Grievance List Horizontal Scroll', () => {
  test('grievance list table has horizontal scroll', async ({ page }) => {
    await page.goto('/hr-manager/grievances/list');

    await page.waitForSelector('table', { timeout: 15000 });

    const tableWrapper = page.locator('.ant-table-content').first();

    const overflowX = await tableWrapper.evaluate((el) => getComputedStyle(el).overflowX);

    expect(['auto', 'scroll']).toContain(overflowX);
  });
});
