const {test, expect} =require('@playwright/test')
|
|
import { LoginPage } from '../pages/LoginPage';
|
|
import { ContentPage } from '../pages/ContentPage';
|
|
|
|
|
|
test.beforeEach(async ({ page }) => {
|
|
|
|
//Navigate to Login Page
|
|
const login = new LoginPage(page);
|
|
await login.gotoLoginPage();
|
|
await login.loginWithCrtPassword();
|
|
});
|
|
|
|
|
|
test('TC-CON-01: Content page is opening?',async ({page})=>{
|
|
|
|
//Navigate to content page
|
|
const content = new ContentPage(page);
|
|
await content.clickContentButton();
|
|
|
|
//Assertion
|
|
await expect(await page.locator(content.contentPageValidate)).toBeVisible();
|
|
|
|
|
|
})
|
|
|
|
//unable to assert
|
|
test.skip('Content page is able to save in privacy policy',async ({page})=>{
|
|
|
|
//Navigate to content page
|
|
const content = new ContentPage(page);
|
|
await content.ContentToSave('Privacy Policy');
|
|
|
|
await page.waitForTimeout(3000);
|
|
|
|
|
|
})
|
|
|
|
test.skip('Content page is able to save in Terms & Conditions',async ({page})=>{
|
|
|
|
//Navigate to content page
|
|
const content = new ContentPage(page);
|
|
await content.ContentToSave('Terms & Conditions');
|
|
|
|
await page.waitForTimeout(3000);
|
|
|
|
|
|
})
|
|
test.skip('Content page is able to save in About Us',async ({page})=>{
|
|
|
|
//Navigate to content page
|
|
const content = new ContentPage(page);
|
|
await content.ContentToSave('About Us');
|
|
|
|
await page.waitForTimeout(3000);
|
|
|
|
|
|
})
|