aboutsummaryrefslogtreecommitdiff
path: root/test/playwright
diff options
context:
space:
mode:
Diffstat (limited to 'test/playwright')
-rw-r--r--test/playwright/integration.spec.js4
-rw-r--r--test/playwright/playwright-util.js22
2 files changed, 13 insertions, 13 deletions
diff --git a/test/playwright/integration.spec.js b/test/playwright/integration.spec.js
index bdbe80e3..b9f51700 100644
--- a/test/playwright/integration.spec.js
+++ b/test/playwright/integration.spec.js
@@ -25,7 +25,7 @@ import {
mockAnkiRouteHandler,
root,
test,
- writeToClipboardFromPage
+ writeToClipboardFromPage,
} from './playwright-util.js';
test.beforeEach(async ({context}) => {
@@ -71,7 +71,7 @@ test('anki add', async ({context, page, extensionId}) => {
await page.locator('input[id="dictionary-import-file-input"]').setInputFiles({
name: 'valid-dictionary1.zip',
mimeType: 'application/x-zip',
- buffer: Buffer.from(dictionary)
+ buffer: Buffer.from(dictionary),
});
await expect(page.locator('id=dictionaries')).toHaveText('Dictionaries (1 installed, 1 enabled)', {timeout: 5 * 60 * 1000});
diff --git a/test/playwright/playwright-util.js b/test/playwright/playwright-util.js
index bebbf08c..d8ecafa2 100644
--- a/test/playwright/playwright-util.js
+++ b/test/playwright/playwright-util.js
@@ -32,8 +32,8 @@ export const test = base.extend({
args: [
'--headless=new',
`--disable-extensions-except=${pathToExtension}`,
- `--load-extension=${pathToExtension}`
- ]
+ `--load-extension=${pathToExtension}`,
+ ],
});
await use(context);
await context.close();
@@ -46,7 +46,7 @@ export const test = base.extend({
const extensionId = background.url().split('/')[2];
await use(extensionId);
- }
+ },
});
export const expect = test.expect;
@@ -59,7 +59,7 @@ export function getMockModelFields() {
['Word', '{expression}'],
['Reading', '{furigana-plain}'],
['Sentence', '{clipboard-text}'],
- ['Audio', '{audio}']
+ ['Audio', '{audio}'],
]);
}
@@ -78,7 +78,7 @@ export async function mockAnkiRouteHandler(route) {
const responseJson = {
status: 200,
contentType: 'text/json',
- body: JSON.stringify(body)
+ body: JSON.stringify(body),
};
await route.fulfill(responseJson);
} catch {
@@ -108,7 +108,7 @@ export function getExpectedAddNoteBody() {
Word: '読む',
Reading: '読[よ]む',
Audio: '[sound:mock_audio.mp3]',
- Sentence: '読むの例文'
+ Sentence: '読むの例文',
},
tags: ['yomitan'],
deckName: 'Mock Deck',
@@ -119,11 +119,11 @@ export function getExpectedAddNoteBody() {
duplicateScopeOptions: {
deckName: null,
checkChildren: false,
- checkAllModels: false
- }
- }
- }
- }
+ checkAllModels: false,
+ },
+ },
+ },
+ },
};
}