Skip to content

Commit 5ead4c1

Browse files
committed
chore: adding uninstall to extension tests
1 parent 077afb9 commit 5ead4c1

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

tests/tools/extensions.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ describe('extension', () => {
122122
assert.ok(list.length === 1, 'List should have only one extension');
123123
const reinstalled = list.find(e => e.id === extensionId);
124124
assert.ok(reinstalled, 'Extension should be present after reload');
125+
await context.uninstallExtension(EXTENSION_WITH_SW_PATH);
125126
});
126127
});
127128
it('triggers an extension action', async () => {
@@ -147,6 +148,7 @@ describe('extension', () => {
147148
t => t.type() === 'page' && t.url().includes(extensionId),
148149
);
149150
assert.ok(pageTargetAfter, 'Page should exist after action');
151+
await context.uninstallExtension(EXTENSION_WITH_SW_PATH);
150152
},
151153
{},
152154
{

tests/tools/pages.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ describe('pages', () => {
8888
'<extension-id>',
8989
);
9090
t.assert.snapshot?.(text);
91+
await context.uninstallExtension(extensionId);
9192
},
9293
{},
9394
{
@@ -142,6 +143,7 @@ describe('pages', () => {
142143
'<extension-id>',
143144
);
144145
t.assert.snapshot?.(text);
146+
await context.uninstallExtension(extensionId);
145147
},
146148
{},
147149
{
@@ -188,11 +190,13 @@ describe('pages', () => {
188190
};
189191
assert.ok(textContent);
190192

193+
// fblmfodlhkojnhihhkjijfcnomcdhfnd
191194
const text = textContent.text.replaceAll(
192195
extensionId,
193196
'<extension-id>',
194197
);
195-
t.assert.snapshot?.(text);
198+
t.assert.snapshot?.(textContent.text);
199+
await context.uninstallExtension(extensionId);
196200
},
197201
{},
198202
{

0 commit comments

Comments
 (0)