Fix(test): Mask username field in settings since it's not deterministic. (#8033)

## Summary

Should stop this from flipping back and forth depending on which user
the harness ends up with.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8033-Fix-test-Mask-username-field-in-settings-since-it-s-not-deterministic-2e76d73d3650811e85f4fc4ca2253e7e)
by [Unito](https://www.unito.io)

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Alexander Brown
2026-01-13 15:44:45 -08:00
committed by GitHub
parent 20d06f92ca
commit 971316205f
3 changed files with 8 additions and 2 deletions

View File

@@ -22,8 +22,14 @@ test.describe('Mobile Baseline Snapshots', () => {
test('@mobile settings dialog', async ({ comfyPage }) => {
await comfyPage.settingDialog.open()
await comfyPage.nextFrame()
await expect(comfyPage.settingDialog.root).toHaveScreenshot(
'mobile-settings-dialog.png'
'mobile-settings-dialog.png',
{
mask: [
comfyPage.settingDialog.root.getByTestId('current-user-indicator')
]
}
)
})
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -7,7 +7,7 @@
pt:text="w-full"
>
<div class="flex items-center justify-between">
<div>
<div data-testid="current-user-indicator">
{{ $t('g.currentUser') }}: {{ userStore.currentUser?.username }}
</div>
<Button