import { test, expect } from '@playwright/test' import { DSS_WEBSITE_URL } from '../../constants' import Header from '../../pages/web/components/Header' import LoginPage from '../../pages/web/page/LoginPage' import ProfilePage from '../../pages/web/page/ProfilePage' let loginPage: LoginPage, header: Header, profilePage: ProfilePage test.beforeEach(({ page }) => { loginPage = new LoginPage(page) header = new Header(page) profilePage = new ProfilePage(page) }) test.describe('Update Profile', ()=>{ test('Can update profile department and designation', async ({ page }) => { const sampleDepartment = 'departmentTwo', sampleDesignaton = 'designationTwo' await page.goto(DSS_WEBSITE_URL) await loginPage.login() await header.navigateToProfilePage() await profilePage.updateOrgInfo({ department: sampleDepartment, designation: sampleDesignaton }) await page.reload({ waitUntil: 'domcontentloaded' }) await header.navigateToProfilePage() expect(await profilePage.inputDepartment.inputValue()).toContain(sampleDepartment) expect(await profilePage.inputDesignation.inputValue()).toContain(sampleDesignaton) }) })