|
const {test, expect} =require('@playwright/test')
|
|
import { LoginPage } from '../pages/LoginPage';
|
|
import { ContentPage } from '../pages/ContentPage';
|
|
|
|
/*
|
|
test('Content page is opening?',async ({page})=>{
|
|
const login = new LoginPage(page);
|
|
await login.gotoLoginPage();
|
|
await login.loginWithCrtPassword();
|
|
await page.waitForTimeout(5000);
|
|
const content = new ContentPage(page);
|
|
await content.clickContentButton();
|
|
await expect(await page.locator(content.contentPageValidate)).toBeVisible();
|
|
// await page.waitForTimeout(3000)
|
|
|
|
})
|
|
*/
|
|
test('Content page is able to save in privacy policy',async ({page})=>{
|
|
const login = new LoginPage(page);
|
|
await login.gotoLoginPage();
|
|
await login.loginWithCrtPassword();
|
|
await page.waitForTimeout(5000);
|
|
const content = new ContentPage(page);
|
|
await content.ContentToSave('Privacy Policy');
|
|
// await expect(await page.locator(content.contentPageValidate)).toBeVisible();
|
|
await page.waitForTimeout(3000);
|
|
|
|
|
|
})
|
|
|
|
test('Content page is able to save in Terms & Conditions',async ({page})=>{
|
|
const login = new LoginPage(page);
|
|
await login.gotoLoginPage();
|
|
await login.loginWithCrtPassword();
|
|
await page.waitForTimeout(5000);
|
|
const content = new ContentPage(page);
|
|
await content.ContentToSave('Terms & Conditions');
|
|
// await expect(await page.locator(content.contentPageValidate)).toBeVisible();
|
|
await page.waitForTimeout(3000);
|
|
|
|
|
|
})
|
|
test('Content page is able to save in About Us',async ({page})=>{
|
|
const login = new LoginPage(page);
|
|
await login.gotoLoginPage();
|
|
await login.loginWithCrtPassword();
|
|
await page.waitForTimeout(5000);
|
|
const content = new ContentPage(page);
|
|
await content.ContentToSave('About Us');
|
|
// await expect(await page.locator(content.contentPageValidate)).toBeVisible();
|
|
await page.waitForTimeout(3000);
|
|
|
|
|
|
})
|