Skip to content

Visual tests: Width value for some elements differs in CI vs. locally #7589

@agniuks

Description

@agniuks

This issue emerged from PR #7363 & explained in final comment.:

Question: from this snapshot and inspecting component properties from VS, it seems like the visibility remains as "visibile," despite the behavior changing as if it was collapsing(and from setting breakpoints in FrameworkElementViewManager I can see that the right code is getting hit and the Visibility value gets set to "Collapsed" - but I never see this in XAML) - any idea what's going on?

if the tree dump says it's not collapsed then it's probably not collapsed : ) (and something else may be re-setting the property?)
Do you see the collapsed element in the UI? What does the Live Visual Tree and Property panes say?

The "collapsed" element is no longer seen in the UI, but the Live Visual Tree and accompanying properties do not seem to change when display:none is toggled. If I undo the code change I added, same thing happens - component goes out of view when display is set to none, but you are still able to tab into those components - when I add the change back in, I'm no longer able to tab into components which are set to display:none, but according to the properties the visibility is still "visible"...

Final comment before merging: Confirmed the elements are getting collapsed through Live Visual Tree and Property panes however the snapshot tests do not reflect this. Might require filing an issue - and if/when this gets fixed this test will fail and will just need updated snapshots to go through.

Additionally, I had to hard code the width for the view containing 2 Text and 2 Switch components as there was a weird width mismatch from running locally vs in the CI checks. To confirm the display:none property change was not the cause, I made sure update property for display was not getting hit when the prop was not used and commit a2ea3df confirmed the view width issue persists even when display:none is not used.

The issue only appears for the Text components and the View containing them - the width value for all 3 is narrower in CI (718) snapshots than in local build (1074).
image

Metadata

Metadata

Assignees

Labels

Area: TestsArea: TextPR Follow-upIssue created in response to PR Feedback (labeled so we can gather telemetry on follow-up)bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions