aboutsummaryrefslogtreecommitdiff
path: root/test/playwright/integration.spec.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2024-02-27 07:14:20 -0500
committerGitHub <noreply@github.com>2024-02-27 12:14:20 +0000
commitc4fea2251606fb0b3d0d761a544dac578f3d9048 (patch)
tree3dbd85877f0d7b3d9de78ace7809e809a7a212d4 /test/playwright/integration.spec.js
parent2e9ea19207a7410f929bb908759d48cb2340f29c (diff)
Update to zip.js for tests (#698)
* Use zip.js * Set compression level to 0 * Update comments
Diffstat (limited to 'test/playwright/integration.spec.js')
-rw-r--r--test/playwright/integration.spec.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/playwright/integration.spec.js b/test/playwright/integration.spec.js
index 8e641397..bdbe80e3 100644
--- a/test/playwright/integration.spec.js
+++ b/test/playwright/integration.spec.js
@@ -16,7 +16,7 @@
*/
import path from 'path';
-import {createDictionaryArchive} from '../../dev/util.js';
+import {createDictionaryArchiveData} from '../../dev/dictionary-archive-util.js';
import {deferPromise} from '../../ext/js/core/utilities.js';
import {
expect,
@@ -67,12 +67,11 @@ test('anki add', async ({context, page, extensionId}) => {
await page.goto(`chrome-extension://${extensionId}/settings.html`);
// Load in test dictionary
- const dictionary = createDictionaryArchive(path.join(root, 'test/data/dictionaries/valid-dictionary1'), 'valid-dictionary1');
- const testDictionarySource = await dictionary.generateAsync({type: 'arraybuffer'});
+ const dictionary = await createDictionaryArchiveData(path.join(root, 'test/data/dictionaries/valid-dictionary1'), 'valid-dictionary1');
await page.locator('input[id="dictionary-import-file-input"]').setInputFiles({
name: 'valid-dictionary1.zip',
mimeType: 'application/x-zip',
- buffer: Buffer.from(testDictionarySource)
+ buffer: Buffer.from(dictionary)
});
await expect(page.locator('id=dictionaries')).toHaveText('Dictionaries (1 installed, 1 enabled)', {timeout: 5 * 60 * 1000});