const {test, expect} =require('@playwright/test') import { LoginPage } from '../pages/LoginPage'; import { ProductPage } from '../pages/ProductPage'; //Product Page Button test cases test.describe('Product Page Button Test Cases',()=>{ //Validate Product button working? test('TC-PP-01: Product button',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.clickProductsButton(); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//a[normalize-space()='Product List']")).toBeVisible(); }) //Validate Product List button working? test('TC-PP-02: Product list button',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.clickProductlistButton(); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//input[@id='oba_product_search']")).toBeVisible(); }) //Validate Add Product Button working? test('TC-PP-03: Add product button',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.clickAddProductButton(); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//input[@id='oba_product_name']")).toBeVisible(); }) // Validate Delete Button is working test('TC-PP-04: Delete Button is working?',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityDelete('Idli Chutney & Vadai', '20', '10', '10','8','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//button[normalize-space()='Yes, delete it!']")).toBeVisible(); }) //Yes Delete Button Assertion is pending test.skip('TC-PP-05: Yes Delete Button is working?',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityDelete('Idli Chutney & Vadai', '20', '10', '10','8','Idli is Tasty'); await page.waitForTimeout(5000); await page.locator("//button[normalize-space()='Yes, delete it!']").click(); }) //Validate the navigation to Product list page test('TC-PP-06: Navigate to product list page button',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.clickAddProductButton(); await page.waitForTimeout(5000); //Assertion await page.locator("//a[@href='productlist']").click(); await expect(page.locator("//i[@class='fa fa-lg fa-fw fa-search']")).toBeVisible(); }) // Validate the edit button test('TC-PP-07: Edit button in product list page',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.clickProductlistButton(); await page.waitForTimeout(5000); //Assertion await page.locator("//tbody/tr[1]/td[7]/div[1]/a[1]").click(); await expect(page.locator("//label[@id='oba_product_name_label']")).toBeVisible(); }) }) test.describe('Product Name Test Cases',()=>{ test('TC-AP-04: Product Name is Empty',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionality('', '250', '10', '5', '20','KK Biriyani'); await page.waitForTimeout(5000); //Assertion const locator = page.locator("//input[@id='oba_product_name']"); await expect(locator).toBeFocused(); await expect(locator).toBeVisible(); await page.close(); }) test('TC-AP-05: Product Name starts with space',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionality(' Biriyani', '250', '10', '5', '20','KK Biriyani'); //Name with space is accepted i.e space button is not working. await page.waitForTimeout(5000); //Assertion await expect(page.locator("//td[normalize-space()='Biriyani']")).toBeVisible(); //delete the product saved await product.deleteProduct(); }) test('TC-AP-06: Enter Number instead of name',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionality('96152456321', '250', '10', '5', '20','KK Biriyani'); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//td[normalize-space()='96152456321']")).toBeVisible(); //delete the product saved await product.deleteProduct(); }) test.skip('TC-AP-07: Enter 50 Alphabet ',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionality('asdfghjklzmxncbvqwertyuioplkjhgfdsazxcvbnmqwertyui', '250', '10', '5', '20','KK Biriyani'); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//td[normalize-space()='asdfghjklzmxncbvqwertyuioplkjhgfdsazxcvbnmqwertyui']")).toBeVisible(); //delete the product saved await product.deleteProduct(); }) test('TC-AP-08: Enter Special Characters and symbol ',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionality('#4nskiu*()', '250', '10', '5', '20','KK Biriyani'); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//td[normalize-space()='#4nskiu*()']")).toBeVisible(); //delete the product saved await product.deleteProduct(); }) test('TC-AP-09: Product Name with Alphabet',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionality('Biriyani', '250', '10', '5', '20','KK Biriyani'); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//td[normalize-space()='Biriyani']")).toBeVisible(); //delete the product saved await product.deleteProduct(); }) test('TC-AP-10: Product Name with space',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Butter Naan', '30', '10', '5', '20','Tasty Butter Naan'); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//td[normalize-space()='Butter Naan']")).toBeVisible(); //delete the product saved await product.deleteProduct(); }) test('TC-AP-11: Product Name with special character',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '50', '10', '5', '20','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//td[normalize-space()='Idli Chutney & Vadai']")).toBeVisible(); //delete the product saved await product.deleteProduct(); }) }) test.describe('Product Price Test Cases',()=>{ test('TC-AP-20: Empty product prize',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '', '10', '5', '20','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion const locator = page.locator("//input[@id='oba_product_price']"); await expect(locator).toBeFocused(); await expect(locator).toBeVisible(); await page.close(); }) test.skip('TC-AP-21: Product prize entered other than numeric value',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai','1F', '10', '5', '20','Idli is Tasty'); await page.waitForTimeout(5000); }) test('TC-AP-22: Product prize entered with Negative value',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai','-40', '10', '5', '20','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion const locator = page.locator("//input[@id='oba_product_price']"); await expect(locator).toBeFocused(); await expect(locator).toBeVisible(); await page.close(); }) test.skip('TC-AP-23: Product prize entered with Special Characters',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai','80%', '10', '5', '20','Idli is Tasty'); await page.waitForTimeout(5000); }) test(' TC-AP-25: Valid Product prize',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai','50', '10', '5', '20','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//b[normalize-space()='50']")).toBeVisible(); //delete the product saved await product.deleteProduct(); }) test('TC-AP-26: Product prize in decimal value',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Vadai','12.27', '10', '5', '20','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//b[normalize-space()='12.27']")).toBeVisible(); //delete the product saved await product.deleteProduct(); }) test('TC-AP-28: Product prize',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai','50', '10', '5', '20','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//b[normalize-space()='50']")).toBeVisible(); //delete the product saved await product.deleteProduct(); }) test('TC-AP-27: Currency Symbol',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.clickAddProductButton(); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//span[@class='input-group-text']")).toBeVisible(); await page.close(); }) test('TC-AP-28: merchant verify price leading with zero',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Vadai','129.06', '10', '5', '20','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//b[normalize-space()='129.06']")).toBeVisible(); await product.deleteProduct(); }) test('TC-AP-29: merchant verify maximum length allowed',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Vadai','12095262', '10', '5', '20','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//b[normalize-space()='12095262']")).toBeVisible(); await product.deleteProduct(); }) test('TC-AP-30: merchant enters prize zero allowed',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Vadai','0', '10', '5', '20','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//b[normalize-space()='0']")).toBeVisible(); //delete the product saved await product.deleteProduct(); }) }) test.describe('Quantity Limit Test Cases',()=>{ test('TC-AP-31: Managed Radio button Check',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '10', '5', '20','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//td[normalize-space()='Idli Chutney & Vadai']")).toBeVisible(); //delete the product saved await product.deleteProduct(); }) test('TC-AP-33: Empty quantity',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '', '5', '20','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion const locator = page.locator("//input[@id='oba_product_quantity']"); await expect(locator).toBeFocused(); await expect(locator).toBeVisible(); await page.close(); }) test.skip('TC-AP-34: Enter other than number',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', 'Apple', '5', '20','Idli is Tasty'); await page.waitForTimeout(5000); }) test('TC-AP-35: merchant enters negative product quantity',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '-30', '5', '20','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion const locator = page.locator("//input[@id='oba_product_quantity']"); await expect(locator).toBeFocused(); await expect(locator).toBeVisible(); await page.close(); }) test.skip('TC-AP-36: merchant enters special characters in product quantity',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '$5', '5', '20','Idli is Tasty'); await page.waitForTimeout(5000); }) test('TC-AP-37: merchant verify valid quantity entry in product quantity',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '5', '6', '20','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//td[normalize-space()='5']")).toBeVisible(); await expect(page.locator("//td[normalize-space()='Idli Chutney & Vadai']")).toBeVisible(); //delete the product saved await product.deleteProduct(); }) test('TC-AP-38: merchant enters decimal quantity',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '50.5', '5', '20','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion const locator = page.locator("//input[@id='oba_product_quantity']"); await expect(locator).toBeFocused(); await expect(locator).toBeVisible(); await page.close(); }) test('TC-AP-39: merchant enters zero',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '0', '5', '20','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//td[normalize-space()='0']")).toBeVisible(); //delete the product saved await product.deleteProduct(); }) }) test.describe('Unmanaged Button',()=>{ test(' TC-AP-43: UnManaged Radio Button working',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityUnmanaged('Tandoori', '450', '5', '20','Crispy Tandoori'); await page.waitForTimeout(5000); //Assertion await expect(await page.locator("//td[normalize-space()='Un-managed']")).toBeVisible(); await product.deleteProduct(); }) }) test.describe('Order Limit Test Cases',()=>{ test('TC-AP-45: Empty order',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '10', '', '20','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion const locator = page.locator("//input[@id='oba_product_order_limit']"); await expect(locator).toBeFocused(); await expect(locator).toBeVisible(); await page.close(); }) test('TC-AP-46: Space at the start of order limit',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '10', ' 6', '20','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion await expect(await page.locator("//td[normalize-space()='10']")).toBeVisible(); //delete the product saved await product.deleteProduct(); }) test.skip('TC-AP-47: Enter character other than numeric value',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '10', 'one', '20','Idli is Tasty'); await page.waitForTimeout(5000); }) test('TC-AP-48: Negative order limit',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '10', '-52', '20','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion const locator = page.locator("//input[@id='oba_product_order_limit']"); await expect(locator).toBeFocused(); await expect(locator).toBeVisible(); await page.close(); }) test.skip('TC-AP-49: Special characters in order limit',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '10', '5%', '20','Idli is Tasty'); await page.waitForTimeout(5000); }) test('TC-AP-51: Decimal Value in order limit',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '10', '100.5', '20','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion const locator = page.locator("//input[@id='oba_product_order_limit']"); await expect(locator).toBeFocused(); await expect(locator).toBeVisible(); await page.close(); }) test('TC-AP-52: Order limit leading with zero',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '10', '050', '20','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion await expect(await page.locator("//td[normalize-space()='50']")).toBeVisible(); //delete the product saved await product.deleteProduct(); }) test('TC-AP-53: Maximum order limit',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '10', '050', '20','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion await expect(await page.locator("//td[normalize-space()='50']")).toBeVisible(); //delete the product saved await product.deleteProduct(); }) test('TC-AP-54: Zero order limit',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '10', '0', '20','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion const locator = page.locator("//input[@id='oba_product_order_limit']"); await expect(locator).toBeFocused(); await expect(locator).toBeVisible(); await page.close(); }) }) test.describe('Product Description',()=>{ test.skip('TC-AP-13: Empty order',async ({page})=>{ //Login to OBA Website const login = new LoginPage(page); await login.OpenOBA(); //Navigate to Product Page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '10', '5', '20','Idli is Tasty'); await page.waitForTimeout(5000); }) }) test.describe(' Tax in % Test Cases',()=>{ test.skip('TC-AP-55: Enter special character',async ({page})=>{ //Navigate to Login Page const login = new LoginPage(page); await login.OpenOBA(); //Navigate to product page const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '10', '10', '^%','Idli is Tasty'); await page.waitForTimeout(5000); }) test.skip('TC-AP-56 : Enter Alphabet',async ({page})=>{ //Navigate to Login Page const login = new LoginPage(page); await login.OpenOBA(); //Navigate to product const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '10', '10', 'ab','Idli is Tasty'); await page.waitForTimeout(5000); }) test.skip('TC-AP-57: Enter space at the start of the word',async ({page})=>{ //Navigate to Login Page const login = new LoginPage(page); await login.OpenOBA(); //Navigate to product const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '10', '10', ' 21','Idli is Tasty'); await page.waitForTimeout(5000); }) test('TC-AP-58: Placeholder check for tax %',async ({page})=>{ //Navigate to Login Page const login = new LoginPage(page); await login.OpenOBA(); //Navigate to product const product = new ProductPage(page); await product.clickAddProductButton(); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//input[@id='oba_product_tax']")).toBeVisible(); }) test('TC-AP-60: Empty Tax %',async ({page})=>{ //Navigate to Login Page const login = new LoginPage(page); await login.OpenOBA(); //Navigate to product const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '10', '10', '','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion const locator = page.locator("//input[@id='oba_product_tax']"); await expect(locator).toBeFocused(); await expect(locator).toBeVisible(); await page.close(); }) test('TC-AP-61:Enter Tax leading with zero',async ({page})=>{ //Navigate to Login Page const login = new LoginPage(page); await login.OpenOBA(); //Navigate to product const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '10', '10', '055','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//td[normalize-space()='Idli Chutney & Vadai']")).toBeVisible(); //delete the product saved await product.deleteProduct(); }) test('TC-AP-62: Enter Tax% is maximum 100',async ({page})=>{ //Navigate to Login Page const login = new LoginPage(page); await login.OpenOBA(); //Navigate to product const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '10', '10', '100','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//td[normalize-space()='Idli Chutney & Vadai']")).toBeVisible(); await product.deleteProduct(); }) test('TC-AP-63: Enter Tax% is maximum 110',async ({page})=>{ //Navigate to Login Page const login = new LoginPage(page); await login.OpenOBA(); //Navigate to product const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '10', '10', '110','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//td[normalize-space()='Idli Chutney & Vadai']")).toBeVisible(); //delete the product saved await product.deleteProduct(); }) test('TC-AP-64:Enter Tax% in negative value',async ({page})=>{ //Navigate to Login Page const login = new LoginPage(page); await login.OpenOBA(); //Navigate to product const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '10', '10', '-10','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion const locator = page.locator("//input[@id='oba_product_tax']"); await expect(locator).toBeFocused(); await expect(locator).toBeVisible(); await page.close(); }) test('TC-AP-65:Enter Tax% is decimal value',async ({page})=>{ //Navigate to Login Page const login = new LoginPage(page); await login.OpenOBA(); //Navigate to product const product = new ProductPage(page); await product.addProductFunctionalityForAll('Idli Chutney & Vadai', '20', '10', '10', '11.23','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//td[normalize-space()='Idli Chutney & Vadai']")).toBeVisible(); //delete the product saved await product.deleteProduct(); }) }) test.describe('Product Live CheckBox',()=>{ test('TC-AP-67: Available and not available checkbox',async ({page})=>{ //navigate to Login const login = new LoginPage(page); await login.OpenOBA(); //Navigate to product const product = new ProductPage(page); await product.addProductFunctionalityUnmanaged('Idli Chutney & Vadai', '20', '10', '10','8','Idli is Tasty'); await page.waitForTimeout(5000); //Assertion await expect(page.locator("//td[normalize-space()='false']")).toBeVisible(); await product.editProduct(); await expect(page.locator("//td[normalize-space()='true']")).toBeVisible(); await product.deleteProduct(); }) })