Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
florine2623 committed Dec 10, 2024
1 parent 33ead04 commit db2a45c
Showing 1 changed file with 59 additions and 60 deletions.
119 changes: 59 additions & 60 deletions tests/UI/campaigns/audit/BO/10_payment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,64 +14,63 @@ import {
const baseContext: string = 'audit_BO_payment';

describe('BO - Payment', async () => {
let browserContext: BrowserContext;
let page: Page;

before(async function () {
utilsPlaywright.setErrorsCaptured(true);

browserContext = await utilsPlaywright.createBrowserContext(this.browser);
page = await utilsPlaywright.newTab(browserContext);
});

after(async () => {
await utilsPlaywright.closeBrowserContext(browserContext);
});

it('should login in BO', async function () {
await testContext.addContextItem(this, 'testIdentifier', 'loginBO', baseContext);

await boLoginPage.goTo(page, global.BO.URL);
await boLoginPage.successLogin(page, global.BO.EMAIL, global.BO.PASSWD);

const pageTitle = await boDashboardPage.getPageTitle(page);
expect(pageTitle).to.contains(boDashboardPage.pageTitle);

const jsErrors = utilsPlaywright.getJsErrors();
expect(jsErrors.length).to.equals(0);
});

it('should go to \'Payment > Payment Methods\' page', async function () {
await testContext.addContextItem(this, 'testIdentifier', 'goToPaymentMethodsPage', baseContext);

await boDashboardPage.goToSubMenu(
page,
boDashboardPage.paymentParentLink,
boDashboardPage.paymentMethodsLink,
);
await boPaymentMethodsPage.closeSfToolBar(page);

const pageTitle = await boPaymentMethodsPage.getPageTitle(page);
expect(pageTitle).to.contains(boPaymentMethodsPage.pageTitle);

const jsErrors = utilsPlaywright.getJsErrors();
expect(jsErrors.length).to.equals(0);
});

it('should go to \'Payment > Preferences\' page', async function () {
await testContext.addContextItem(this, 'testIdentifier', 'goToPaymentPreferencesPage', baseContext);

await boDashboardPage.goToSubMenu(
page,
boDashboardPage.paymentParentLink,
boDashboardPage.preferencesLink,
);

const pageTitle = await preferencesPage.getPageTitle(page);
expect(pageTitle).to.contains(preferencesPage.pageTitle);

const jsErrors = utilsPlaywright.getJsErrors();
expect(jsErrors.length).to.equals(0);
});
});
let browserContext: BrowserContext;
let page: Page;

before(async function () {
utilsPlaywright.setErrorsCaptured(true);

browserContext = await utilsPlaywright.createBrowserContext(this.browser);
page = await utilsPlaywright.newTab(browserContext);
});

after(async () => {
await utilsPlaywright.closeBrowserContext(browserContext);
});

it('should login in BO', async function () {
await testContext.addContextItem(this, 'testIdentifier', 'loginBO', baseContext);

await boLoginPage.goTo(page, global.BO.URL);
await boLoginPage.successLogin(page, global.BO.EMAIL, global.BO.PASSWD);

const pageTitle = await boDashboardPage.getPageTitle(page);
expect(pageTitle).to.contains(boDashboardPage.pageTitle);

const jsErrors = utilsPlaywright.getJsErrors();
expect(jsErrors.length).to.equals(0);
});

it('should go to \'Payment > Payment Methods\' page', async function () {
await testContext.addContextItem(this, 'testIdentifier', 'goToPaymentMethodsPage', baseContext);

await boDashboardPage.goToSubMenu(
page,
boDashboardPage.paymentParentLink,
boDashboardPage.paymentMethodsLink,
);
await boPaymentMethodsPage.closeSfToolBar(page);

const pageTitle = await boPaymentMethodsPage.getPageTitle(page);
expect(pageTitle).to.contains(boPaymentMethodsPage.pageTitle);

const jsErrors = utilsPlaywright.getJsErrors();
expect(jsErrors.length).to.equals(0);
});

it('should go to \'Payment > Preferences\' page', async function () {
await testContext.addContextItem(this, 'testIdentifier', 'goToPaymentPreferencesPage', baseContext);

await boDashboardPage.goToSubMenu(
page,
boDashboardPage.paymentParentLink,
boDashboardPage.preferencesLink,
);

const pageTitle = await preferencesPage.getPageTitle(page);
expect(pageTitle).to.contains(preferencesPage.pageTitle);

const jsErrors = utilsPlaywright.getJsErrors();
expect(jsErrors.length).to.equals(0);
});
});

0 comments on commit db2a45c

Please sign in to comment.