Skip to content

Commit a3d4d14

Browse files
committed
[bidi][js] Enable add intercept parameters test
1 parent dc62d24 commit a3d4d14

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

javascript/node/selenium-webdriver/bidi/addInterceptParameters.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class AddInterceptParameters {
6969
* @throws {Error} - If the pattern is not an instance of String.
7070
*/
7171
urlStringPattern(pattern) {
72-
if (!(pattern instanceof String)) {
72+
if (typeof pattern !== 'string') {
7373
throw new Error(`Pattern must be an instance of String. Received:'${pattern}'`)
7474
}
7575

@@ -84,7 +84,7 @@ class AddInterceptParameters {
8484
*/
8585
urlStringPatterns(patterns) {
8686
patterns.forEach((pattern) => {
87-
if (!(pattern instanceof String)) {
87+
if (typeof pattern !== 'string') {
8888
throw new Error(`Pattern must be an instance of String. Received:'${pattern}'`)
8989
}
9090
this.#urlPatterns.push({ type: 'string', pattern: pattern })

javascript/node/selenium-webdriver/test/bidi/add_intercept_parameters_test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,21 @@ suite(
3939
})
4040

4141
describe('Add Intercept parameters test', function () {
42-
xit('can add intercept phase', async function () {
42+
it('can add intercept phase', async function () {
4343
const network = await Network(driver)
4444
const intercept = await network.addIntercept(new AddInterceptParameters(InterceptPhase.BEFORE_REQUEST_SENT))
4545
assert.notEqual(intercept, null)
4646
})
4747

48-
xit('can add intercept phases', async function () {
48+
it('can add intercept phases', async function () {
4949
const network = await Network(driver)
5050
const intercept = await network.addIntercept(
5151
new AddInterceptParameters(InterceptPhase.AUTH_REQUIRED, InterceptPhase.BEFORE_REQUEST_SENT),
5252
)
5353
assert.notEqual(intercept, null)
5454
})
5555

56-
xit('can add string url pattern', async function () {
56+
it('can add string url pattern', async function () {
5757
const network = await Network(driver)
5858
const intercept = await network.addIntercept(
5959
new AddInterceptParameters(InterceptPhase.BEFORE_REQUEST_SENT).urlStringPattern(
@@ -63,7 +63,7 @@ suite(
6363
assert.notEqual(intercept, null)
6464
})
6565

66-
xit('can add string url patterns', async function () {
66+
it('can add string url patterns', async function () {
6767
const network = await Network(driver)
6868
const intercept = await network.addIntercept(
6969
new AddInterceptParameters(InterceptPhase.BEFORE_REQUEST_SENT).urlStringPatterns([
@@ -74,7 +74,7 @@ suite(
7474
assert.notEqual(intercept, null)
7575
})
7676

77-
xit('can add url pattern', async function () {
77+
it('can add url pattern', async function () {
7878
const network = await Network(driver)
7979
const urlPattern = new UrlPattern().protocol('http').hostname('localhost').port(4444).pathname('basicAuth')
8080
const intercept = await network.addIntercept(
@@ -83,7 +83,7 @@ suite(
8383
assert.notEqual(intercept, null)
8484
})
8585

86-
xit('can add url patterns', async function () {
86+
it('can add url patterns', async function () {
8787
const network = await Network(driver)
8888
const urlPattern1 = new UrlPattern()
8989
.protocol('http')

0 commit comments

Comments
 (0)