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