import { test } from '@/portal/modules/customer/customer-fixtures';
import { customerLoginTestCases } from '@/portal/modules/customer/test-cases/customer-login-test-cases';
import { expect } from '@playwright/test';

for (const tc of customerLoginTestCases.happy) {
  test(tc.description, async ({ customerLoginView }) => {
    const accountView = await test.step('log in as customer', async () => {
      return customerLoginView.login(tc.data);
    });

    await test.step('verify account view is ready', async () => {
      await expect(accountView.title).toBeVisible();
      await expect(accountView.skeletons).toHaveCount(0);
    });
  });
}
