summaryrefslogtreecommitdiffstats
path: root/tests/e2e/markup.test.e2e.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/e2e/markup.test.e2e.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/e2e/markup.test.e2e.js b/tests/e2e/markup.test.e2e.js
new file mode 100644
index 0000000..920537d
--- /dev/null
+++ b/tests/e2e/markup.test.e2e.js
@@ -0,0 +1,14 @@
+// @ts-check
+import {expect} from '@playwright/test';
+import {test} from './utils_e2e.js';
+
+test('markup with #xyz-mode-only', async ({page}) => {
+ const response = await page.goto('/user2/repo1/issues/1');
+ await expect(response?.status()).toBe(200);
+ await page.waitForLoadState('networkidle');
+
+ const comment = page.locator('.comment-body>.markup', {hasText: 'test markup light/dark-mode-only'});
+ await expect(comment).toBeVisible();
+ await expect(comment.locator('[src$="#gh-light-mode-only"]')).toBeVisible();
+ await expect(comment.locator('[src$="#gh-dark-mode-only"]')).toBeHidden();
+});