From d8dd1ae872fe39def37b2e5a7c96a123c7417b11 Mon Sep 17 00:00:00 2001 From: amrita Date: Mon, 28 Oct 2024 10:05:35 +0545 Subject: [PATCH] fix selector --- tests/e2e/support/objects/federation/actions.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/e2e/support/objects/federation/actions.ts b/tests/e2e/support/objects/federation/actions.ts index 4f7ba124875..4c106285217 100644 --- a/tests/e2e/support/objects/federation/actions.ts +++ b/tests/e2e/support/objects/federation/actions.ts @@ -6,10 +6,11 @@ const generateInvitationButton = '//button[contains(@aria-label,"Generate invitation link that can be shared with one or more invitees")]' const generateInvitationActionConfirmButton = '.oc-modal-body-actions-confirm' const invitationToken = 'span:has-text("%s")' -const InvitationInput = '//input[starts-with(@id, "oc-textinput-")]' +const invitationInput = '//input[starts-with(@id, "oc-textinput-")]' const invitationConnectionRow = '//div[@id="sciencemesh-connections"]//td[text()="%s"]/parent::tr/td[text()="%s"]' const institutionOptionDropdown = '.vs__open-indicator' +const inviterInstitutionOption = '//ul[@id="vs2__listbox"]/li' const acceptInvitationButton = 'button:has(span:has-text("Accept invitation"))' export const generateInvitation = async (args: { page: Page; user: string }): Promise => { @@ -38,9 +39,9 @@ export const generateInvitation = async (args: { page: Page; user: string }): Pr export const acceptInvitation = async (args: { page: Page; sharer: string }): Promise => { const { page, sharer } = args const invitation = federatedInvitationCode.get(sharer.toLowerCase()) - await page.locator(InvitationInput).fill(invitation.code) + await page.locator(invitationInput).fill(invitation.code) await page.locator(institutionOptionDropdown).click() - await page.getByRole('option', { name: 'first-ocis-instance ocis-server:' }).click() + await page.locator(inviterInstitutionOption).click() await Promise.all([ page.waitForResponse( (resp) =>