feat: interaction change (#788)

This commit is contained in:
Qi
2023-02-15 15:21:29 +08:00
committed by GitHub
parent ce24174971
commit eb1d4fe1f6
8 changed files with 119 additions and 97 deletions
+1 -7
View File
@@ -6,13 +6,7 @@ loadPage();
test.describe('Open contact us', () => {
test('Click right-bottom corner contact icon', async ({ page }) => {
const faqIcon = page.locator('[data-testid=faq-icon]');
const box = await faqIcon.boundingBox();
expect(box?.x).not.toBeUndefined();
await faqIcon.click();
await page.mouse.move((box?.x ?? 0) + 10, (box?.y ?? 0) + 10);
await page.mouse.move((box?.x ?? 0) + 5, (box?.y ?? 0) + 5);
await page.locator('[data-testid=help-island]').click();
const rightBottomContactUs = page.locator(
'[data-testid=right-bottom-contact-us-icon]'
);
+1 -5
View File
@@ -6,11 +6,7 @@ loadPage();
test.describe('Shortcuts Modal', () => {
test('Open shortcuts modal', async ({ page }) => {
const faqIcon = page.locator('[data-testid=faq-icon]');
const box = await faqIcon.boundingBox();
expect(box?.x).not.toBeUndefined();
await page.mouse.move((box?.x ?? 0) + 5, (box?.y ?? 0) + 5);
await faqIcon.click();
await page.locator('[data-testid=help-island]').click();
const shortcutsIcon = page.locator('[data-testid=shortcuts-icon]');
expect(await shortcutsIcon.isVisible()).toEqual(true);