import {
  happyDiscountCreateTestData,
  unhappyDiscountCreateTestData,
} from '@/manager/modules/discount/data/discount-create-test-data';
import { test } from '@/manager/modules/discount/discount-fixtures';
import {
  expectDiscountToBeCreated,
  expectDiscountToNotBeCreated,
} from '@/manager/modules/discount/utils/discount-create-expect-utils';

for (const data of happyDiscountCreateTestData) {
  test(data.description, async ({ discountListPage }) => {
    await expectDiscountToBeCreated(discountListPage, data.discount);
  });
}

for (const data of unhappyDiscountCreateTestData) {
  test(data.description, async ({ discountListPage }) => {
    await expectDiscountToNotBeCreated(discountListPage, data.discount);
  });
}
