Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt committed Jun 11, 2024
1 parent fdf130a commit 87752e2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions tests/electron/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ config.projects.push({
name: 'electron-api',
use: {
browserName: 'chromium',
headless: false,
},
testDir: path.join(testDir, 'electron'),
metadata,
Expand All @@ -65,6 +66,7 @@ config.projects.push({
snapshotPathTemplate: '{testDir}/{testFileDir}/{testFileName}-snapshots/{arg}-chromium{ext}',
use: {
browserName: 'chromium',
headless: false,
},
testDir: path.join(testDir, 'page'),
metadata,
Expand Down
6 changes: 3 additions & 3 deletions tests/page/page-set-input-files.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

import { test as it, expect } from './pageTest';
import { attachFrame } from '../config/utils';
import { attachFrame, chromiumVersionLessThan } from '../config/utils';

import path from 'path';
import fs from 'fs';
Expand All @@ -37,7 +37,7 @@ it('should upload the file', async ({ page, server, asset }) => {
}, input)).toBe('contents of the file');
});

it('should upload a folder', async ({ page, server, browserName, headless, browserMajorVersion }) => {
it('should upload a folder', async ({ page, server, browserName, headless, browserVersion }) => {
await page.goto(server.PREFIX + '/input/folderupload.html');
const input = await page.$('input');
const dir = path.join(it.info().outputDir, 'file-upload-test');
Expand All @@ -51,7 +51,7 @@ it('should upload a folder', async ({ page, server, browserName, headless, brows
await input.setInputFiles(dir);
expect(new Set(await page.evaluate(e => [...e.files].map(f => f.webkitRelativePath), input))).toEqual(new Set([
// https://issues.chromium.org/issues/345393164
...((browserName === 'chromium' && headless && browserMajorVersion < 128) ? [] : ['file-upload-test/sub-dir/really.txt']),
...((browserName === 'chromium' && headless && chromiumVersionLessThan(browserVersion, '127.0.6533.0')) ? [] : ['file-upload-test/sub-dir/really.txt']),
'file-upload-test/file1.txt',
'file-upload-test/file2',
]));
Expand Down
1 change: 1 addition & 0 deletions tests/webview2/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ config.projects.push({
snapshotPathTemplate: '{testDir}/{testFileDir}/{testFileName}-snapshots/{arg}-chromium{ext}',
use: {
browserName: 'chromium',
headless: false,
},
testDir: path.join(testDir, 'page'),
metadata,
Expand Down

0 comments on commit 87752e2

Please sign in to comment.