Skip to content

percyElementSnapshot (percySnapshot) inside within() #24891

@luixxiul

Description

@luixxiul

Steps to reproduce

  1. Run get(…).percyElementSnapshot(…) inside within() to have Percy take snapshots

Outcome

What did you expect?

I expected that percyElementSmapshot() would respect the element specified with get() chained with within().

For example, the command below of matrix-org/matrix-react-sdk#10400 would have Percy take a snapshot of
.mx_FilePanel .mx_RoomView_MessageList:

cy.get(".mx_FilePanel").within(() => {

    ...

    cy.get(".mx_RoomView_MessageList").percySnapshotElement("File tiles on FilePanel");
});

What happened instead?

Based on this result, it seems that Percy takes the snapshot of mx_RoomView_MessageList on the main timeline, not on mx_FilePanel. I am not sure if this would be expected, but I assume it is confusing.

Operating system

No response

Browser information

No response

URL for webapp

No response

Application version

No response

Homeserver

No response

Will you send logs?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Developer-ExperienceA-TestingTesting, code coverage, etc.O-UncommonMost users are unlikely to come across this or unexpected workflowS-MinorImpairs non-critical functionality or suitable workarounds existT-Defect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions