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

test.describe('Incident List Horizontal Scroll', () => {
  test('incident list table has horizontal scroll', async ({ page }) => {
    await page.goto('/hr-manager/incidents/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);
  });
});
