Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E2E tests failed with locator resolving to 2 elements while creating file from template file via Collabora #12154

Open
PrajwolAmatya opened this issue Feb 4, 2025 · 4 comments
Assignees
Labels
Type:Bug Something isn't working

Comments

@PrajwolAmatya
Copy link
Contributor

Description

Web E2E tests failed while creating file from template file for Collabora with locator resolved to 2 elements.

Failed Step:

✖ When "Alice" creates a file from template file "Template.ott" via "Collabora" using the context menu # file:/var/www/owncloud/web/tests/e2e/cucumber/steps/ui/resources.ts:420
       locator.click: Error: strict mode violation: locator('//*[@id="oc-files-context-actions-context"]//span[text()="Create from template via Collabora"]') resolved to 2 elements:
           1) <span>Create from template via Collabora</span> aka getByRole('button', { name: 'Create from template via' }).first()
           2) <span>Create from template via Collabora</span> aka getByRole('button', { name: 'Create from template via' }).nth(2)

       Call log:
         - waiting for locator('//*[@id="oc-files-context-actions-context"]//span[text()="Create from template via Collabora"]')

           at Module.createFileFromTemplate (/var/www/owncloud/web/tests/e2e/support/objects/app-files/resource/actions.ts:179:70)
           at async Resource.createFileFromTemplate (/var/www/owncloud/web/tests/e2e/support/objects/app-files/resource/index.ts:274:9)
           at async World.<anonymous> (/var/www/owncloud/web/tests/e2e/cucumber/steps/ui/resources.ts:423:5)

Log report:

npx playwright show-trace https://cache.owncloud.com/public/owncloud/web/50266/tracing/create-files-from-office-templates-alice-2025-2-4-01-54-21.zip

Builds:

@PrajwolAmatya PrajwolAmatya self-assigned this Feb 4, 2025
@PrajwolAmatya
Copy link
Contributor Author

PrajwolAmatya commented Feb 4, 2025

The options Create from template via Collabora and Create from template via OnlyOffice are repeated twice, hence the failure.

Image

@PrajwolAmatya
Copy link
Contributor Author

PrajwolAmatya commented Feb 4, 2025

The options Create from template via Collabora and Create from template via OnlyOffice are repeated twice, hence the failure.

Hi @LukasHirt,

The options to create file from the template is being repeated. It is occurring after this PR #12145 got merged. Can you have a look at it?

Thanks

@LukasHirt
Copy link
Collaborator

Sure, I'll take a look tomorrow.

@LukasHirt LukasHirt self-assigned this Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type:Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants