-
-
Notifications
You must be signed in to change notification settings - Fork 291
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(test-runner): allow setting concurrency per browser
- Loading branch information
1 parent
15a3ad2
commit f6afd79
Showing
28 changed files
with
355 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { playwrightLauncher } from '@web/test-runner-playwright'; | ||
|
||
export default /** @type {import('@web/test-runner').TestRunnerConfig} */ ({ | ||
nodeResolve: true, | ||
rootDir: '../../', | ||
|
||
groups: [ | ||
{ | ||
name: 'firefox', | ||
files: 'demo/test/focus/focus-*.test.js', | ||
browsers: [playwrightLauncher({ product: 'firefox', concurrency: 1 })], | ||
}, | ||
{ | ||
name: 'chromium', | ||
files: 'demo/test/focus/focus-*.test.js', | ||
browsers: [playwrightLauncher({ product: 'chromium' })], | ||
}, | ||
{ | ||
name: 'webkit', | ||
files: 'demo/test/focus/focus-*.test.js', | ||
browsers: [playwrightLauncher({ product: 'webkit' })], | ||
}, | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { expect } from '@esm-bundle/chai'; | ||
|
||
it('can run a test with focus a', async () => { | ||
const input = document.createElement('input'); | ||
document.body.appendChild(input); | ||
|
||
let firedEvent = false; | ||
input.addEventListener('focus', () => { | ||
firedEvent = true; | ||
}); | ||
input.focus(); | ||
|
||
await Promise.resolve(); | ||
expect(firedEvent).to.be.true; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { expect } from '@esm-bundle/chai'; | ||
|
||
it('can run a test with focus b', async () => { | ||
const input = document.createElement('input'); | ||
document.body.appendChild(input); | ||
|
||
let firedEvent = false; | ||
input.addEventListener('focus', () => { | ||
firedEvent = true; | ||
}); | ||
input.focus(); | ||
|
||
await Promise.resolve(); | ||
expect(firedEvent).to.be.true; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { expect } from '@esm-bundle/chai'; | ||
|
||
it('can run a test with focus b', async () => { | ||
const input = document.createElement('input'); | ||
document.body.appendChild(input); | ||
|
||
let firedEvent = false; | ||
input.addEventListener('focus', () => { | ||
firedEvent = true; | ||
}); | ||
input.focus(); | ||
|
||
await Promise.resolve(); | ||
expect(firedEvent).to.be.true; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { expect } from '@esm-bundle/chai'; | ||
|
||
it('can run a test with focus b', async () => { | ||
const input = document.createElement('input'); | ||
document.body.appendChild(input); | ||
|
||
let firedEvent = false; | ||
input.addEventListener('focus', () => { | ||
firedEvent = true; | ||
}); | ||
input.focus(); | ||
|
||
await Promise.resolve(); | ||
expect(firedEvent).to.be.true; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { expect } from '@esm-bundle/chai'; | ||
|
||
it('can run a test with focus b', async () => { | ||
const input = document.createElement('input'); | ||
document.body.appendChild(input); | ||
|
||
let firedEvent = false; | ||
input.addEventListener('focus', () => { | ||
firedEvent = true; | ||
}); | ||
input.focus(); | ||
|
||
await Promise.resolve(); | ||
expect(firedEvent).to.be.true; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { expect } from '@esm-bundle/chai'; | ||
|
||
it('can run a test with focus b', async () => { | ||
const input = document.createElement('input'); | ||
document.body.appendChild(input); | ||
|
||
let firedEvent = false; | ||
input.addEventListener('focus', () => { | ||
firedEvent = true; | ||
}); | ||
input.focus(); | ||
|
||
await Promise.resolve(); | ||
expect(firedEvent).to.be.true; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { expect } from '@esm-bundle/chai'; | ||
|
||
it('can run a test with focus b', async () => { | ||
const input = document.createElement('input'); | ||
document.body.appendChild(input); | ||
|
||
let firedEvent = false; | ||
input.addEventListener('focus', () => { | ||
firedEvent = true; | ||
}); | ||
input.focus(); | ||
|
||
await Promise.resolve(); | ||
expect(firedEvent).to.be.true; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { expect } from '@esm-bundle/chai'; | ||
|
||
it('can run a test with focus b', async () => { | ||
const input = document.createElement('input'); | ||
document.body.appendChild(input); | ||
|
||
let firedEvent = false; | ||
input.addEventListener('focus', () => { | ||
firedEvent = true; | ||
}); | ||
input.focus(); | ||
|
||
await Promise.resolve(); | ||
expect(firedEvent).to.be.true; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { expect } from '@esm-bundle/chai'; | ||
|
||
it('can run a test with focus b', async () => { | ||
const input = document.createElement('input'); | ||
document.body.appendChild(input); | ||
|
||
let firedEvent = false; | ||
input.addEventListener('focus', () => { | ||
firedEvent = true; | ||
}); | ||
input.focus(); | ||
|
||
await Promise.resolve(); | ||
expect(firedEvent).to.be.true; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { expect } from '@esm-bundle/chai'; | ||
|
||
it('can run a test with focus b', async () => { | ||
const input = document.createElement('input'); | ||
document.body.appendChild(input); | ||
|
||
let firedEvent = false; | ||
input.addEventListener('focus', () => { | ||
firedEvent = true; | ||
}); | ||
input.focus(); | ||
|
||
await Promise.resolve(); | ||
expect(firedEvent).to.be.true; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { expect } from '@esm-bundle/chai'; | ||
|
||
it('can run a test with focus b', async () => { | ||
const input = document.createElement('input'); | ||
document.body.appendChild(input); | ||
|
||
let firedEvent = false; | ||
input.addEventListener('focus', () => { | ||
firedEvent = true; | ||
}); | ||
input.focus(); | ||
|
||
await Promise.resolve(); | ||
expect(firedEvent).to.be.true; | ||
}); |
Oops, something went wrong.