We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c5573e1 commit bcee516Copy full SHA for bcee516
1 file changed
test/playwright/site.spec.js
@@ -16,6 +16,22 @@ test('navigation', async ({ page }) => {
16
});
17
18
test('code copy buttons', async ({ page, context }) => {
19
+
20
+ await page.addInitScript(() => {
21
+ let clipboard = '';
22
23
+ Object.defineProperty(navigator, 'clipboard', {
24
+ configurable: false,
25
+ writable: false,
26
+ value: {
27
+ writeText: async (text) => {
28
+ clipboard = text;
29
+ },
30
+ readText: async () => clipboard,
31
32
+ });
33
34
35
await context.grantPermissions(['clipboard-read']);
36
await page.goto('https://docs.etherlink.com/get-started/network-information');
37
0 commit comments