const {test, expect} =require('@playwright/test') import { LoginPage } from '../pages/LoginPage'; import { NotificationPage } from '../pages/NotificationPage'; test('TC-NP-01: Notification Button is working?',async ({page}) =>{ //login Function const login = new LoginPage(page); await login.gotoLoginPage(); await login.loginWithCrtPassword(); await page.waitForTimeout(500); //Notify Function using Send Notification by Name const notified = new NotificationPage(page); await notified.notificationPageCheck(); await expect(await page.locator(notified.selecttype)).toBeVisible(); await page.close(); }) test.skip('Working_NotifybyName', async ({page}) =>{ //login Function const login = new LoginPage(page); await login.gotoLoginPage(); await login.loginWithCrtPassword(); await page.waitForTimeout(500); //Notify Function using Send Notification by Name const Notified = new NotificationPage(page); await Notified.wholeNotificationSettingNew('Send notification by name','Shubya','Shubya','Successfully Added Notification by Name','2026','April 2026','2','') await page.reload(); await expect(await page.locator("//button[normalize-space()='OK']")).toBeVisible(); await page.close(); }) test.skip('Duplicate NotifybyName', async ({page}) =>{ //login Function const login = new LoginPage(page); await login.gotoLoginPage(); await login.loginWithCrtPassword(); await page.waitForTimeout(500); //Notify Function using Send Notification by Name const Notified = new NotificationPage(page); await Notified.NotifyMeWithName('Send notification by name','Shubya','Shubya','Successfully Added Notification by Name'); await Notified.setDate('2026','April 2026','2'); //await Notified.setTime('8','45'); await Notified.selectFile('C:/Automate Testing/OBA Automation/Biriyani.jpg'); await Notified.sendNotification(); // await page.waitForTimeout(1000); await page.close(); }) test.skip('NotifybyArea', async ({page}) =>{ //login Function const login = new LoginPage(page); await login.gotoLoginPage(); await login.loginWithCrtPassword(); await page.waitForTimeout(1000); //Notify Function using Send Notification by Area const Notified = new Notify(page); await Notified.NotifyMewithArea('Send notification by Area','Shubya','586101','Successfully Added Notification by area'); await Notified.setDate('2026','April 2026','2'); await Notified.selectFile('C:/PlayWright/files/SS.jpeg'); await Notified.sendNotification(); await page.close(); }) test.skip('check time is set',async({page})=>{ const login = new LoginPage(page); await login.gotoLoginPage(); await login.loginWithCrtPassword(); await page.waitForTimeout(1000); const Notified = new Notify(page); await Notified.NotifyMewithArea('Send notification by Area','Shubya','ABCDF','Successfully Added Notification by area'); await page.waitForTimeout(100); await Notified.setTime('8','45'); await page.waitForTimeout(100); await page.close(); }) test.skip('check Date Set',async({page})=>{ const login = new LoginPage(page); await login.gotoLoginPage(); await login.loginWithCrtPassword(); await page.waitForTimeout(1000); const Notified = new Notify(page); await Notified.setDate('2025','March 2025','27'); await page.close(); }) test.skip('check Send Notification',async({page})=>{ const login = new LoginPage(page); await login.gotoLoginPage(); await login.loginWithCrtPassword(); await page.waitForTimeout(1000); const dash = new DashBoard(page); await dash.gotoNotification() const Notified = new Notify(page); await Notified.sendNotification(); await page.close(); }) test.skip('check file selected',async({page})=>{ const login = new LoginPage(page); await login.gotoLoginPage(); await login.loginWithCrtPassword(); await page.waitForTimeout(1000); const Notified = new Notify(page); await Notified.selectFile('C:/PlayWright/files/SS.jpeg'); await Notified.sendNotification(); await page.close(); })