"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const experimental_ct_react_1 = require("@playwright/experimental-ct-react");
const react_1 = __importDefault(require("react"));
const Exam_story_1 = require("../stories/exam/Exam.story");
const utils_1 = require("../utils/utils");
experimental_ct_react_1.test.describe.configure({ mode: 'serial' });
experimental_ct_react_1.test.describe('Exam', () => {
    let masteredExam_SC;
    let masteredExamNoAttachments;
    experimental_ct_react_1.test.beforeAll(async () => {
        masteredExam_SC = await (0, utils_1.setupMasteredExam)();
        masteredExamNoAttachments = await (0, utils_1.setupMasteredExam)('test/no_attachments.xml');
    });
    (0, experimental_ct_react_1.test)('exam without attachments contains notification', async ({ mount }) => {
        const component = await mount(react_1.default.createElement(Exam_story_1.ExamStory, { masteredExam: masteredExamNoAttachments }));
        const notification = component.locator('.notification').getByText('Tämä koe ei sisällä aineistoja');
        await (0, experimental_ct_react_1.expect)(notification).toBeVisible();
    });
    (0, experimental_ct_react_1.test)('exam with attachments contains no notification', async ({ mount }) => {
        const component = await mount(react_1.default.createElement(Exam_story_1.ExamStory, { masteredExam: masteredExam_SC }));
        const notification = component.locator('.notification').getByText('Tämä koe ei sisällä aineistoja');
        await (0, experimental_ct_react_1.expect)(notification).not.toBeVisible();
    });
});
//# sourceMappingURL=Exam.test.js.map