Skip to content

Commit 08ca082

Browse files
author
Ondrej Machala
committed
fix: update demo test to use heroshot.sh with correct selector
Changed from BBC (which blocks CI runners) to heroshot.sh landing page. Fixed selector to correctly target the Point and Click feature card.
1 parent 1c3cef0 commit 08ca082

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

editor/tests/demo-screenshots.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ import { createMockScreenshot, injectToolbar } from './utils';
1313

1414
const HEROSHOT_URL = 'https://heroshot.sh';
1515

16-
// Selector for a feature card on the landing page
17-
const FEATURE_SELECTOR = '.VPFeature';
16+
// Selector for the second feature card ("Point and Click") on the landing page
17+
// Each VPFeature is wrapped in a .item div inside .items container
18+
const FEATURE_SELECTOR = '.items > .item:nth-of-type(2) .VPFeature';
1819

1920
test('demo: pick element on heroshot.sh landing page with padding', async ({ page }) => {
2021
test.setTimeout(60000);
@@ -51,6 +52,8 @@ test('demo: pick element on heroshot.sh landing page with padding', async ({ pag
5152

5253
// Step 2: Get element rect and drag corner to add padding (~80px for more visible effect)
5354
const featureElement = page.locator(FEATURE_SELECTOR).first();
55+
await featureElement.scrollIntoViewIfNeeded();
56+
await page.waitForTimeout(300);
5457
const elementRect = await featureElement.boundingBox();
5558
if (!elementRect) throw new Error('Could not get element bounding box');
5659

-135 Bytes
Loading
-1.21 KB
Loading
10.4 KB
Loading

0 commit comments

Comments
 (0)