summaryrefslogtreecommitdiff
path: root/test/playwright/integration.spec.js
diff options
context:
space:
mode:
authorCashew <52880648+Scrub1492@users.noreply.github.com>2023-12-25 15:51:01 +0700
committerGitHub <noreply@github.com>2023-12-25 08:51:01 +0000
commit8e95d99e6a1891eaf9331f6384fa3b1a1065b871 (patch)
tree2c5977e66410b502da436da7381d67b38698b5c4 /test/playwright/integration.spec.js
parente0659a84b2c85344e000536f4d3fa53bd5932567 (diff)
Style updates (#447)
* style updates * style updates * style updates * revert changes to dev/lib/handlebars * revert changes to dev/lib/handlebars * revert changes to dev/lib/handlebars
Diffstat (limited to 'test/playwright/integration.spec.js')
-rw-r--r--test/playwright/integration.spec.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/playwright/integration.spec.js b/test/playwright/integration.spec.js
index c8cf2f6d..d5b8360c 100644
--- a/test/playwright/integration.spec.js
+++ b/test/playwright/integration.spec.js
@@ -29,7 +29,7 @@ import {
} from './playwright-util';
test.beforeEach(async ({context}) => {
- // wait for the on-install welcome.html tab to load, which becomes the foreground tab
+ // Wait for the on-install welcome.html tab to load, which becomes the foreground tab
const welcome = await context.waitForEvent('page');
await welcome.close(); // close the welcome tab so our main tab becomes the foreground tab -- otherwise, the screenshot can hang
});
@@ -44,7 +44,7 @@ test('search clipboard', async ({page, extensionId}) => {
});
test('anki add', async ({context, page, extensionId}) => {
- // mock anki routes
+ // Mock anki routes
/** @type {?(value: unknown) => void} */
let resolve = null;
const addNotePromise = new Promise((res) => {
@@ -58,10 +58,10 @@ test('anki add', async ({context, page, extensionId}) => {
}
});
- // open settings
+ // Open settings
await page.goto(`chrome-extension://${extensionId}/settings.html`);
- // load in test dictionary
+ // Load in test dictionary
const dictionary = createDictionaryArchive(path.join(root, 'test/data/dictionaries/valid-dictionary1'), 'valid-dictionary1');
const testDictionarySource = await dictionary.generateAsync({type: 'arraybuffer'});
await page.locator('input[id="dictionary-import-file-input"]').setInputFiles({
@@ -71,11 +71,11 @@ test('anki add', async ({context, page, extensionId}) => {
});
await expect(page.locator('id=dictionaries')).toHaveText('Dictionaries (1 installed, 1 enabled)', {timeout: 5 * 60 * 1000});
- // connect to anki
+ // Connect to anki
await page.locator('.toggle', {has: page.locator('[data-setting="anki.enable"]')}).click();
await expect(page.locator('#anki-error-message')).toHaveText('Connected');
- // prep anki deck
+ // Prep anki deck
await page.locator('[data-modal-action="show,anki-cards"]').click();
await page.locator('select.anki-card-deck').selectOption('Mock Deck');
await page.locator('select.anki-card-model').selectOption('Mock Model');
@@ -85,7 +85,7 @@ test('anki add', async ({context, page, extensionId}) => {
await page.locator('#anki-cards-modal > div > div.modal-footer > button:nth-child(2)').click();
await writeToClipboardFromPage(page, '読むの例文');
- // add to anki deck
+ // Add to anki deck
await page.goto(`chrome-extension://${extensionId}/search.html`);
await expect(async () => {
await page.locator('#search-textbox').clear();