OBA Website automated using playwright
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

87 lines
2.2 KiB

const {test, expect} =require('@playwright/test')
import { LoginPage } from '../pages/LoginPage';
import { CatlogPage } from '../pages/CatlogPage';
test.beforeEach(async ({ page }) => {
//Navigate to Login Page
const login = new LoginPage(page);
await login.gotoLoginPage();
await login.loginWithCrtPassword();
});
test('TC-CP-14: CatlogButton is working?',async ({page})=>{
//Navigate to catlog page
const catlog = new CatlogPage(page);
await catlog.clickCatalogButton();
await page.waitForTimeout(3000)
//Assertion
await expect(await page.locator(catlog.catlogPageValidate)).toBeVisible();
})
//Not able to assert
test.skip('Buds List is selected',async ({page})=>{
//Navigate to Catlog page
const catlog = new CatlogPage(page);
await catlog.imageUpload('BUDS_LIST', 'PRODUCTS_LEFT');
await page.waitForTimeout(3000)
})
test.skip('Buds sliding is selected',async ({page})=>{
//Navigate to Catlog page
const catlog = new CatlogPage(page);
await catlog.imageUpload('BUDS_SLIDING', 'PRODUCTS_LEFT');
await page.waitForTimeout(3000)
})
test.skip('Buds grid is selected',async ({page})=>{
//Navigate to Catlog page
const catlog = new CatlogPage(page);
await catlog.imageUpload('BUDS_GRID', 'PRODUCTS_LEFT');
await page.waitForTimeout(3000)
})
test.skip('product left is selected',async ({page})=>{
//Navigate to Catlog page
const catlog = new CatlogPage(page);
await catlog.imageUpload('BUDS_GRID', 'PRODUCTS_LEFT');
await page.waitForTimeout(3000)
})
test.skip('product ping pong is selected',async ({page})=>{
//Navigate to catlog page
const catlog = new CatlogPage(page);
await catlog.imageUpload('BUDS_GRID', 'PRODUCTS_PING_PONG');
await page.waitForTimeout(3000)
})
test.skip('product right is selected',async ({page})=>{
//Navigate to Catlog Page
const catlog = new CatlogPage(page);
await catlog.imageUpload('BUDS_GRID', 'PRODUCTS_RIGHT');
await page.waitForTimeout(3000)
})
test.skip('product grid is selected',async ({page})=>{
//Navigate to catlog page
const catlog = new CatlogPage(page);
await catlog.imageUpload('BUDS_GRID', 'PRODUCTS_GRID');
await page.waitForTimeout(3000)
})