import { test, expect } from '../../fixtures/index';
import { LoginPage } from '../../pom/login.page';
import { SentPage } from '../../pom/sent/sent.page';

test.describe("UI case for inbox tests", async () => {
    let loginPage: LoginPage;
    let sentPage: SentPage;

    test.beforeEach(async ({ page, conf }) => {
        loginPage = new LoginPage(page);
        sentPage = new SentPage(page);

        await loginPage.open();
        await loginPage.login(conf.data.username, conf.data.password);
        await sentPage.open();
    });

    test("SENT_001 -  Verify UI when empty state", {
        tag: ["@SENT_001", "@sent", "@ui"]
    }, async ({ conf }) => {
        await expect(sentPage.dashboardLoc.root).toMatchAriaSnapshot(sentPage.sentSnapshot.emptySent);
    })

    test("SENT_002 - Verify UI when have inbox", {
        tag: ["@SENT_002", "@sent", "@ui"]
    }, async () => {
        await expect(sentPage.dashboardLoc.root).toMatchAriaSnapshot(sentPage.sentSnapshot.haveSentHeadingColumn);
    })
})