Skip to content

Commit

Permalink
fix(deps): updated dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-molak committed Feb 4, 2021
1 parent e805134 commit a748db5
Show file tree
Hide file tree
Showing 6 changed files with 3,847 additions and 2,244 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ module.exports = {
'quotes': 'off',
'@typescript-eslint/quotes': ['error', 'single', { 'allowTemplateLiterals': true }],

'simple-import-sort/sort': 'error',
'simple-import-sort/imports': 'error',

'unicorn/empty-brace-spaces': 'off',

'unicorn/filename-case': [ 'error', {
'cases': {
Expand Down
15 changes: 7 additions & 8 deletions e2e/puppeteer/chrome-authenticator-extension.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import { Ensure, equals } from '@serenity-js/assertions';
import { Ability, Actor, actorCalled, Cast, engage, Interaction, Question, UsesAbilities } from '@serenity-js/core';
import { LocalServer, ManageALocalServer, StartLocalServer, StopLocalServer } from '@serenity-js/local-server';
import { Browser, ElementHandle, Page, Response } from 'puppeteer';
import { Browser, ElementHandle, HTTPResponse, Page } from 'puppeteer/lib/cjs/puppeteer/api-docs-entry';

/* eslint-disable-next-line @typescript-eslint/no-var-requires */
const puppeteer = require('puppeteer');

import { Authenticator } from '../../src';
import { TestApp } from '../TestApp';

// eslint-disable-next-line @typescript-eslint/no-var-requires
const puppeteer = require('puppeteer');

let page: Page;
let browser: Browser;

Expand All @@ -23,7 +23,6 @@ describe('Chrome Authenticator Extension, when used with Puppeteer', function ()

browser = await puppeteer.launch({
headless: false,

args: [
`--disable-extensions-except=${ authenticator }`,
`--load-extension=${ authenticator }`,
Expand Down Expand Up @@ -76,7 +75,7 @@ const Navigate = {
actor
.answer(url)
.then(actualUrl => BrowseTheWeb.as(actor).get(actualUrl))
.then((_: Response | null) => void 0), // eslint-disable-line @typescript-eslint/no-unused-vars
.then((_: HTTPResponse | null) => void 0), // eslint-disable-line @typescript-eslint/no-unused-vars
),
};

Expand All @@ -93,7 +92,7 @@ const Text = {
of: (target: Question<Promise<ElementHandle | null>>) =>
Question.about<Promise<string>>(`text of ${ target }`, actor =>
actor.answer(target).then(element => {
return page.evaluate(actualElement => actualElement.textContent, element);
return page.evaluate((actualElement: any) => actualElement.textContent, element);
}),
),
};
Expand All @@ -114,7 +113,7 @@ class BrowseTheWeb implements Ability {
constructor(private readonly page: Page) {
}

get(destination: string): Promise<Response | null> {
get(destination: string): Promise<HTTPResponse | null> {
return this.page.goto(destination);
}

Expand Down
8 changes: 4 additions & 4 deletions e2e/webdriverio/chrome-authenticator-extension.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
UsesAbilities,
} from '@serenity-js/core';
import { LocalServer, ManageALocalServer, StartLocalServer } from '@serenity-js/local-server';
import { BrowserObject, Element } from 'webdriverio';
import { BrowserObject, Element, MultiRemoteBrowser } from 'webdriverio';

import { TestApp } from '../TestApp';

Expand Down Expand Up @@ -82,15 +82,15 @@ const TestPage = {
};

class BrowseTheWeb implements Ability {
static using(browserInstance: BrowserObject) {
static using(browserInstance: BrowserObject | MultiRemoteBrowser) {
return new BrowseTheWeb(browserInstance);
}

static as(actor: UsesAbilities): BrowseTheWeb {
return actor.abilityTo(BrowseTheWeb);
}

constructor(private readonly browserInstance: BrowserObject) {
constructor(private readonly browserInstance: BrowserObject | MultiRemoteBrowser) {
}

get(destination: string): Promise<void> {
Expand All @@ -102,7 +102,7 @@ class BrowseTheWeb implements Ability {
}

sleep(durationInMillis: number) {
return browser.pause(durationInMillis);
return this.browserInstance.pause(durationInMillis);
}
}

Expand Down
1 change: 0 additions & 1 deletion e2e/webdriverio/wdio.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,5 @@ exports.config = {
mochaOpts: {
ui: 'bdd',
timeout: 60000,
require: 'ts-node/register',
},
};
Loading

0 comments on commit a748db5

Please sign in to comment.