Skip to content

Commit de55e9b

Browse files
committed
Remove the tests for the clipboard API - agreed with Jacob to keep the tests minimal due to the permisions problem with the clipboard API running headless
1 parent e46e459 commit de55e9b

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

packages/uui-copy/lib/uui-copy.test.ts

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -25,43 +25,4 @@ describe('UUICopyElement', () => {
2525
</uui-button>
2626
`);
2727
});
28-
29-
it('copies the value property to clipboard when button is clicked', async () => {
30-
const button = element.shadowRoot?.querySelector('uui-button');
31-
// // Mock the clipboard API
32-
// navigator.clipboard = {
33-
// writeText: async text => {
34-
// expect(text).to.equal('Test Text');
35-
// return Promise.resolve();
36-
// },
37-
// };
38-
39-
button?.click();
40-
});
41-
42-
it('fires copying and copied events', async () => {
43-
const button = element.shadowRoot?.querySelector('uui-button');
44-
// // Mock the clipboard API
45-
// navigator.clipboard = {
46-
// writeText: async text => {
47-
// return Promise.resolve();
48-
// },
49-
// };
50-
51-
let copyingEventFired = false;
52-
let copiedEventFired = false;
53-
54-
element.addEventListener('copying', () => {
55-
copyingEventFired = true;
56-
});
57-
58-
element.addEventListener('copied', () => {
59-
copiedEventFired = true;
60-
});
61-
62-
button?.click();
63-
64-
expect(copyingEventFired).to.be.true;
65-
expect(copiedEventFired).to.be.true;
66-
});
6728
});

0 commit comments

Comments
 (0)