Skip to content

Commit

Permalink
Merge branch 'main' into US152271_Cleanup_Folders_Option_2
Browse files Browse the repository at this point in the history
  • Loading branch information
svanherk committed Jun 22, 2023
2 parents 36ffa98 + 6bba8c2 commit baecb3b
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@brightspace-ui/testing",
"description": "Utilities for testing front-end components and applications",
"type": "module",
"version": "0.10.0",
"version": "0.11.0",
"repository": "https://github.com/BrightspaceUI/testing.git",
"scripts": {
"lint": "eslint . --ext .js",
Expand Down
2 changes: 1 addition & 1 deletion src/browser/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export async function sendKeys(action, keys) {
await cmdSendKeys(val);
}

export async function sendKeysElem(action, keys, elem) {
export async function sendKeysElem(elem, action, keys) {
if (elem) {
await focusElem(elem);
}
Expand Down
2 changes: 1 addition & 1 deletion src/server/headed-mode-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { globSync } from 'glob';

export function headedMode({ manual, watch, pattern }) {

const files = globSync(pattern, { ignore: 'node_modules/**' });
const files = globSync(pattern, { ignore: 'node_modules/**', posix: true });

return {
name: 'brightspace-headed-mode',
Expand Down
3 changes: 2 additions & 1 deletion src/server/wtr-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ const optionDefinitions = [
{ name: 'watch', type: Boolean },
// custom options
{ name: 'chromium', type: Boolean },
{ name: 'filter', alias: 'f', type: String, multiple: true },
{ name: 'firefox', type: Boolean },
{ name: 'golden', type: Boolean },
{ name: 'grep', alias: 'g', type: String },
{ name: 'filter', alias: 'f', type: String, multiple: true },
{ name: 'timeout', type: Number },
{ name: 'webkit', type: Boolean },
];
Expand Down Expand Up @@ -213,6 +213,7 @@ export class WTRConfig {
if (!Array.isArray(browsers)) throw new TypeError('browsers must be an array');

return browsers.map((b) => playwrightLauncher({
concurrency: b === 'firefox' ? 1 : undefined, // focus in Firefox unreliable if concurrency > 1 (https://github.com/modernweb-dev/web/issues/238)
product: b,
createBrowserContext: ({ browser }) => browser.newContext({ deviceScaleFactor: 2, reducedMotion: 'reduce' })
}));
Expand Down
2 changes: 1 addition & 1 deletion test/browser/commands.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('commands', () => {
});

it('should send keys to element', async() => {
await sendKeysElem('type', 'Hello', elem);
await sendKeysElem(elem, 'type', 'Hello');
expect(elem.value).to.equal('Hello');
});

Expand Down

0 comments on commit baecb3b

Please sign in to comment.