Skip to content

Commit

Permalink
change locators
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotrk39 committed Feb 14, 2025
1 parent 1821bed commit 66245a8
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions e2e/portalicious/pages/PaymentsPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class PaymentsPage extends BasePage {
readonly paymentSummaryMetrics: Locator;
readonly paymentSummaryWithInstructions: Locator;
readonly exportFspPaymentListButton: Locator;
readonly exportDropdown: Locator;
readonly importDropdown: Locator;
readonly exportButton: Locator;
readonly importReconcilationDataButton: Locator;
readonly chooseFileButton: Locator;
readonly importFileButton: Locator;
readonly proceedButton: Locator;
Expand Down Expand Up @@ -49,8 +49,12 @@ class PaymentsPage extends BasePage {
this.exportFspPaymentListButton = this.page.getByLabel(
'Export FSP payment list',
);
this.exportDropdown = this.page.locator('app-single-payment-export');
this.importReconcilationDataButton = this.page.getByLabel('Import reconciliation data')
this.exportButton = this.page.getByRole('button', {
name: 'Export',
});
this.importReconcilationDataButton = this.page.getByRole('button', {
name: 'Import reconciliation data',
});
this.chooseFileButton = this.page.getByRole('button', {
name: 'Choose file',
});
Expand Down Expand Up @@ -199,7 +203,7 @@ class PaymentsPage extends BasePage {
}
}
async selectPaymentExportOption({ option }: { option: string }) {
await this.exportDropdown.click();
await this.exportButton.click();
await this.page.getByRole('menuitem', { name: option }).click();
}

Expand Down Expand Up @@ -260,15 +264,15 @@ class PaymentsPage extends BasePage {
}

async importReconciliationData(filePath: string) {
await this.importDropdown.click();
await this.importReconcilationDataButton.click();

await this.FileChooserComponent(filePath);

await this.importFileButton.click();
}

async exportFspPaymentList() {
await this.exportDropdown.click();
await this.exportButton.click();
await this.exportFspPaymentListButton.click();
}
}
Expand Down

0 comments on commit 66245a8

Please sign in to comment.