Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
AyushAgrawal-A2 committed Jan 24, 2024
1 parent d7b7ebc commit d2e9dd8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/edgeless/selection.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ test('when the selection is always a note, it should remain in an active state',
await assertSelectionInNote(page, ids.noteId);
});

test('should auto panning when selection rectangle reaches viewport edges', async ({
test.only('should auto panning when selection rectangle reaches viewport edges', async ({
page,
}) => {
await enterPlaygroundRoom(page);
Expand Down Expand Up @@ -211,7 +211,7 @@ test('should auto panning when selection rectangle reaches viewport edges', asyn
);
await setEdgelessTool(page, 'default');
await page.mouse.click(210, 110);
let selectedRect = await page.locator(selectedRectClass);
let selectedRect = page.locator(selectedRectClass);
await expect(selectedRect).toBeHidden();
// Click to start selection and hold the mouse to trigger auto panning to the left
await page.mouse.move(210, 110);
Expand All @@ -221,7 +221,7 @@ test('should auto panning when selection rectangle reaches viewport edges', asyn
await page.mouse.up();

// Expect to select the shape element
selectedRect = await page.locator(selectedRectClass);
selectedRect = page.locator(selectedRectClass);
await page.waitForTimeout(300);
await expect(selectedRect).toBeVisible();

Expand All @@ -241,7 +241,7 @@ test('should auto panning when selection rectangle reaches viewport edges', asyn
);
await setEdgelessTool(page, 'default');
await page.mouse.click(600, 100);
selectedRect = await page.locator(selectedRectClass);
selectedRect = page.locator(selectedRectClass);
await expect(selectedRect).toBeHidden();
// Click to start selection and hold the mouse to trigger auto panning to the top
await page.mouse.move(600, 100);
Expand All @@ -251,7 +251,7 @@ test('should auto panning when selection rectangle reaches viewport edges', asyn
await page.mouse.up();

// Expect to select the empty note
selectedRect = await page.locator(selectedRectClass);
selectedRect = page.locator(selectedRectClass);
await page.waitForTimeout(300);
await expect(selectedRect).toBeVisible();

Expand All @@ -271,7 +271,7 @@ test('should auto panning when selection rectangle reaches viewport edges', asyn
);
await setEdgelessTool(page, 'default');
await page.mouse.click(800, 600);
selectedRect = await page.locator(selectedRectClass);
selectedRect = page.locator(selectedRectClass);
await expect(selectedRect).toBeHidden();
// Click to start selection and hold the mouse to trigger auto panning to the right
await page.mouse.move(800, 600);
Expand All @@ -281,7 +281,7 @@ test('should auto panning when selection rectangle reaches viewport edges', asyn
await page.mouse.up();

// Expect to select the empty note
selectedRect = await page.locator(selectedRectClass);
selectedRect = page.locator(selectedRectClass);
await page.waitForTimeout(300);
await expect(selectedRect).toBeVisible();

Expand All @@ -304,7 +304,7 @@ test('should auto panning when selection rectangle reaches viewport edges', asyn
);
await setEdgelessTool(page, 'default');
await page.mouse.click(700, 800);
selectedRect = await page.locator(selectedRectClass);
selectedRect = page.locator(selectedRectClass);
await expect(selectedRect).toBeHidden();

// Click to start selection and hold the mouse to trigger auto panning to the right
Expand All @@ -315,7 +315,7 @@ test('should auto panning when selection rectangle reaches viewport edges', asyn
await page.mouse.up();

// Expect to select the empty note
selectedRect = await page.locator(selectedRectClass);
selectedRect = page.locator(selectedRectClass);
await expect(selectedRect).toBeVisible();
});

Expand Down

0 comments on commit d2e9dd8

Please sign in to comment.