From 019b3d28e88f27929a33538167fcef56fea5c1ca Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 3 Jul 2026 09:52:32 -0400 Subject: [PATCH] added code for creating fee schedule --- test-automation/pages/pay-admin-page.js | 19 +++++++++++++++++++ test-automation/tests/pay-admin-page.spec.js | 9 +++++++++ 2 files changed, 28 insertions(+) diff --git a/test-automation/pages/pay-admin-page.js b/test-automation/pages/pay-admin-page.js index 0a282c2b..8f577a3e 100644 --- a/test-automation/pages/pay-admin-page.js +++ b/test-automation/pages/pay-admin-page.js @@ -20,6 +20,14 @@ export class PayAdminPage { this.code = page.locator('[id="code"]') this.comments = page.locator('[id="comments"]') this.saveButton = page.locator('[class="btn btn-primary"]') + this.feeSchedule = page.getByText('Fee Schedule') + this.createLink = page.getByRole('link', { name: 'Create' }) + this.variableFeeFlag = page.getByText('Variable Fee Flag') + this.showOnPriceListFlag = page.getByText('Show on Price List') + this.gstAddedToStatutoryFeesFlag = page.getByText('GST Added to Statutory Fees') + this.gstAddedToServicesFeesFlag = page.getByText('GST Added to Services Fees') + + } async createFeeCode() { @@ -31,4 +39,15 @@ export class PayAdminPage { await this.comments.fill('Test comments', {timeout: 10000}) await this.saveButton.click({timeout: 10000}) } + + async validateFeeSchedule() { + //TODO- will update later to use env variable for url + await this.page.goto(process.env.FEECODEURL) + await this.feeSchedule.click({timeout: 10000}) + await this.createLink.click({timeout: 10000}) + await this.variableFeeFlag.click({timeout: 10000}) + await this.showOnPriceListFlag.click({timeout: 10000}) + await this.gstAddedToStatutoryFeesFlag.click({timeout: 10000}) + await this.gstAddedToServicesFeesFlag.click({timeout: 10000}) + } } \ No newline at end of file diff --git a/test-automation/tests/pay-admin-page.spec.js b/test-automation/tests/pay-admin-page.spec.js index 5cb6b8bd..8f944fb0 100644 --- a/test-automation/tests/pay-admin-page.spec.js +++ b/test-automation/tests/pay-admin-page.spec.js @@ -27,4 +27,13 @@ test.describe.serial('Pay Admin Tests', () => { await loginPage.loginWithIDIR(process.env.TEST_USERNAME_IDIR, process.env.TEST_PASSWORD_IDIR) await payAdminPage.createFeeCode() }) + + test.use({ storageState: { cookies: [], origins: [] } }) + test('validate pay admin functionality-validate fee schedule', async ({ page, payAdminPage , loginPage }) => { + console.log('Test: Current URL before navigation:', page.url()) + console.log('Test: Cookies loaded:', (await page.context().cookies()).length) + // use credentials for Pay admin + await loginPage.loginWithIDIR(process.env.TEST_USERNAME_IDIR, process.env.TEST_PASSWORD_IDIR) + await payAdminPage.validateFeeSchedule() + }) }) \ No newline at end of file