refactor(e2e/web): resolve todo of expectSelectedReadonly

This commit is contained in:
Norihide Saito
2025-11-30 09:35:30 +09:00
parent 13104d49cd
commit 0d5685a3fa
2 changed files with 4 additions and 6 deletions

View File

@@ -117,12 +117,9 @@ export const thumbnailUtils = {
await expect(thumbnailUtils.withAssetId(page, assetId).locator('[data-icon-archive]')).toHaveCount(0);
},
async expectSelectedReadonly(page: Page, assetId: string) {
// todo - need a data attribute for selected
await expect(
page.locator(
`[data-thumbnail-focus-container][data-asset="${assetId}"] > .group.cursor-not-allowed > .rounded-xl`,
),
).toBeVisible();
const container = thumbnailUtils.withAssetId(page, assetId);
await expect(container.locator('[data-selected]')).toBeVisible();
await expect(container.locator('button[role="checkbox"][disabled]')).toBeVisible();
},
async expectTimelineHasOnScreenAssets(page: Page) {
const first = await thumbnailUtils.getFirstInViewport(page);

View File

@@ -230,6 +230,7 @@
{ 'rounded-xl': selected },
]}
data-outline
data-selected={selected || undefined}
></div>
<div