Skip to content

Commit acd57b3

Browse files
committed
fix: add missing goToPageUrl method and remove duplicate function in orchestrator e2e tests
- Add goToPageUrl() method to UIhelper class from upstream/main - Remove duplicate selectGreetingWorkflowItem() method in Orchestrator class - Resolves TypeError: uiHelper.goToPageUrl is not a function in orchestrator RBAC tests
1 parent f382f5c commit acd57b3

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

e2e-tests/playwright/support/pages/orchestrator.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -180,21 +180,6 @@ export class Orchestrator {
180180
}
181181
}
182182

183-
async selectGreetingWorkflowItem() {
184-
const workflowHeader = this.page.getByRole("heading", {
185-
name: "Workflows",
186-
});
187-
await expect(workflowHeader).toBeVisible();
188-
await expect(workflowHeader).toHaveText("Workflows");
189-
190-
// Wait for the workflows table to be visible
191-
const workflowsTable = this.page.getByRole("table");
192-
await expect(workflowsTable).toBeVisible();
193-
194-
// Click on the Greeting workflow link
195-
await this.page.getByRole("link", { name: "Greeting workflow" }).click();
196-
}
197-
198183
async getPageUrl() {
199184
return this.page.url();
200185
}

e2e-tests/playwright/utils/ui-helper.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,14 @@ export class UIhelper {
223223
.click();
224224
}
225225

226+
async goToPageUrl(url: string, heading?: string) {
227+
await this.page.goto(url);
228+
await expect(this.page).toHaveURL(url);
229+
if (heading) {
230+
await this.verifyHeading(heading);
231+
}
232+
}
233+
226234
async goToSettingsPage() {
227235
await expect(this.page.locator("nav[id='global-header']")).toBeVisible();
228236
await this.openProfileDropdown();

0 commit comments

Comments
 (0)