profile
viewpoint
Maksim Markelov mmarkelov Russia, Saint Petersburg

glennreyes/react-countup 733

💫 A configurable React component wrapper around CountUp.js

gribnoysup/react-yandex-maps 223

Yandex Maps API bindings for React

mmarkelov/jest-playwright 26

Running tests using Jest & Playwright 🚀

mmarkelov/jest-playwright-example 1

A working example of jest with playwright 🚀

mmarkelov/react 1

A declarative, efficient, and flexible JavaScript library for building user interfaces.

mmarkelov/ant-design 0

🌈 A UI Design Language and React UI library

push eventmmarkelov/jest-playwright

mmarkelov

commit sha 94cf4ebd4e4cd1cdc0940804661dc1b629200403

Fix optionalDependencies versions

view details

push time in 2 hours

push eventmmarkelov/jest-playwright

mmarkelov

commit sha a09f4a6f7a04ec8ddfdbb8edca8fd1075f970823

Add support for playwright-core

view details

mmarkelov

commit sha c825bced0089ab4dd4da67f9943a3e520e27b0e9

Merge branch 'master' of https://github.com/mmarkelov/jest-playwright into Add-support-for-playwright-core  Conflicts:  package.json  src/utils.js

view details

mmarkelov

commit sha d6c888ae2d155bc838febf7b18a942ee85964171

Add some improvements for playwright 0.11

view details

Maksim Markelov

commit sha 76e4b0374cde97a6690c000432dc75314a703014

Merge pull request #40 from mmarkelov/Add-support-for-playwright-core Add support for playwright-core

view details

push time in 2 hours

pull request commentmmarkelov/jest-playwright

Add support for playwright core

@aesyondu I suppose it is better to use eslint, to move out from comments it can be defined in eslint config

mmarkelov

comment created time in 2 hours

push eventmmarkelov/jest-playwright

Max Schmitt

commit sha bd115aa2996214ca0a95d85d151a837fcac8ed4c

feat: bumped playwright

view details

Max Schmitt

commit sha 36de8241611f975a7b5d3b17fee6108353bbf3d7

feat: pin playwright dependencies

view details

Max Schmitt

commit sha 038ea7c8277b9ecfcd143d1bf74327fff58222e6

fix: import of standalone packages after upstream change ref: https://github.com/microsoft/playwright/pull/818

view details

Max Schmitt

commit sha 263abbfb92428da0eaf17533a59fe2cce9f0a501

fix: move jest-dev-server into optionalDependencies

view details

Max Schmitt

commit sha 84d05a8ac9b0d4550cb49e6defd4481e79f0b5b6

fix: tests

view details

Max Schmitt

commit sha a66df2c97e189fc3d696e8afbf3bff663d2c36c3

fix: tests

view details

Maksim Markelov

commit sha f98d70f087d3a07ba1707b989782e5f5be4c2730

Merge pull request #39 from mxschmitt/bugfix/playwright-11 fix: Playwright 0.11.0+ support

view details

mmarkelov

commit sha c825bced0089ab4dd4da67f9943a3e520e27b0e9

Merge branch 'master' of https://github.com/mmarkelov/jest-playwright into Add-support-for-playwright-core  Conflicts:  package.json  src/utils.js

view details

mmarkelov

commit sha d6c888ae2d155bc838febf7b18a942ee85964171

Add some improvements for playwright 0.11

view details

push time in 2 hours

push eventmmarkelov/jest-playwright

Max Schmitt

commit sha bd115aa2996214ca0a95d85d151a837fcac8ed4c

feat: bumped playwright

view details

Max Schmitt

commit sha 36de8241611f975a7b5d3b17fee6108353bbf3d7

feat: pin playwright dependencies

view details

Max Schmitt

commit sha 038ea7c8277b9ecfcd143d1bf74327fff58222e6

fix: import of standalone packages after upstream change ref: https://github.com/microsoft/playwright/pull/818

view details

Max Schmitt

commit sha 263abbfb92428da0eaf17533a59fe2cce9f0a501

fix: move jest-dev-server into optionalDependencies

view details

Max Schmitt

commit sha 84d05a8ac9b0d4550cb49e6defd4481e79f0b5b6

fix: tests

view details

Max Schmitt

commit sha a66df2c97e189fc3d696e8afbf3bff663d2c36c3

fix: tests

view details

Maksim Markelov

commit sha f98d70f087d3a07ba1707b989782e5f5be4c2730

Merge pull request #39 from mxschmitt/bugfix/playwright-11 fix: Playwright 0.11.0+ support

view details

push time in 3 hours

PR merged mmarkelov/jest-playwright

fix: Playwright 0.11.0+ support
  • fix: that the standalone exports are now the same like the normal playwright package (https://github.com/microsoft/playwright/pull/818)
  • fix: dependencies should not be in optionalDependencies and devDependencies at the same time. NPM logged for that a warning. So I've adjusted it. But not 100% sure if it's correct like that. Providing versions for them is in my mind a good idea.
npm WARN The package jest-dev-server is included as both a dev and production dependency.
npm WARN The package playwright is included as both a dev and production dependency.

Closes #33

(It wasn't working with the 0.11+ version when the standalone version was used.)

TypeError: playwrightInstance.launch is not a function
+111 -189

0 comment

3 changed files

mxschmitt

pr closed time in 3 hours

issue closedmmarkelov/jest-playwright

Migrate to new playwright version

Playwright 0.11.0 was released, as I know there were some changes with API, so it can need some changes to current implementation #30

closed time in 3 hours

mmarkelov

issue commentfacebook/react

Wanna see my hot pics?💋💋💋

Issue that we deserved

akdnfbf

comment created time in a day

issue commentmmarkelov/jest-playwright

[BUG] page.route not working properly

@aesyondu I suppose it came from jest, but actually I'm not sure. It's very confusing

aesyondu

comment created time in a day

Pull request review commentmmarkelov/jest-playwright

fix: Playwright 0.11.0+ support

 export async function readPackage() {  export async function getPlaywrightInstance(browserType) {   const playwrightPackage = await readPackage()-  if (playwrightPackage === 'playwright') {

I can check it out and just add some extra logic in this PR

mxschmitt

comment created time in a day

Pull request review commentmmarkelov/jest-playwright

fix: Playwright 0.11.0+ support

 export async function readPackage() {  export async function getPlaywrightInstance(browserType) {   const playwrightPackage = await readPackage()-  if (playwrightPackage === 'playwright') {

@mxschmitt no. It will crash for other users with it configuration: package.json

...
"scripts": {
    "test": "jest"
  },
"dependencies": {
    "jest-playwright-preset": "0.0.9",
    "playwright-firefox": "^0.11.0"
  },
...

With 0.10.0 running test will be fine, but with 0.11.0 it will crash I suppose, if browser not be defined. So it need to be BROWSER=firefox test as example

mxschmitt

comment created time in a day

Pull request review commentmmarkelov/jest-playwright

fix: Playwright 0.11.0+ support

 export async function readPackage() {  export async function getPlaywrightInstance(browserType) {   const playwrightPackage = await readPackage()-  if (playwrightPackage === 'playwright') {

I'm not quit sure that it wiil be ok, if we are using playwright-firefox for example, and then we will run tests without browser definition, that's ok for now, but now it will throw an error, i suppose, cause chromium will be default value. So we need some extra logic to find out using version

mxschmitt

comment created time in a day

Pull request review commentmmarkelov/jest-playwright

fix: Playwright 0.11.0+ support

 export async function readPackage() {   const packageConfig = await require(absConfigPath)   const playwright =     checkDependencies(packageConfig.dependencies) ||-    checkDependencies(packageConfig.devDependencies)+    checkDependencies(packageConfig.devDependencies) ||+    checkDependencies(packageConfig.optionalDependencies)

@mxschmitt oh! now I see we need it to pass tests. Yeah! We need to find out some workaround it

mxschmitt

comment created time in a day

Pull request review commentmmarkelov/jest-playwright

fix: Playwright 0.11.0+ support

 export async function readPackage() {   const packageConfig = await require(absConfigPath)   const playwright =     checkDependencies(packageConfig.dependencies) ||-    checkDependencies(packageConfig.devDependencies)+    checkDependencies(packageConfig.devDependencies) ||+    checkDependencies(packageConfig.optionalDependencies)

I'm not sure that we need to checkout optionalDependencies

mxschmitt

comment created time in a day

Pull request review commentmmarkelov/jest-playwright

fix: Playwright 0.11.0+ support

     "jest-environment-node": "^25.1.0"   },   "optionalDependencies": {-    "jest-dev-server": "*",

@mxschmitt I think it should be optional, cause we need it if only server option defined in config

mxschmitt

comment created time in a day

issue commentmmarkelov/jest-playwright

[BUG] page.route not working properly

@aesyondu hm! This is strange, I'm not sure what can be wrong with it. It seems be OK when I'm using string with it:

    it('this is the second test', async () => {
        await page.route('**/*.{png,jpg,jpeg}', request => request.abort());
        await page.goto('https://example.com')
    })

Looks like instanceof RegExp for passed regexp return false. I'll try to find out why it is happend

aesyondu

comment created time in a day

Pull request review commentmmarkelov/jest-playwright

feat: Initial version for Typescript

+import { LaunchOptions } from 'playwright-core/lib/server/browserType'+import { BrowserContextOptions } from 'playwright-core/lib/browserContext'+export const CHROMIUM = 'chromium'+export const FIREFOX = 'firefox'+export const WEBKIT = 'webkit'++export const PARALLEL = '--parallel'++export interface Config {+  launchBrowserApp?: LaunchOptions+  context?: BrowserContextOptions,+  exitOnPageError: boolean,+  browser?: string

I suppose it should be one of CHROMIUM, FIREFOX or WEBKIT

mxschmitt

comment created time in a day

create barnchmmarkelov/jest-playwright

branch : Add-support-for-playwright-core

created branch time in a day

issue closedmmarkelov/react-nouislider

Update of step is not being forwarded to noUIslider

There are two things that I want to address on react-nouislider.

One: The react.memo in the index.js calls:

const areEqual = (prevProps, nextProps) => {
  const { start, disabled, range } = prevProps;
  return (
    isEqual(nextProps.start, start) &&
    nextProps.disabled === disabled &&
    isEqual(nextProps.range, range)
  );
};

Which does not cover changes in step. While this is something that can be updated and should trigger a re-render.

Two: When you change both the range and the step in order to trigger a re-render the step value is not being adjusted to the new value. Instead, the initialized step value used to initiate the noUISlider keeps being used (no matter how many updates you send). For example: you initialize the step value with 1, then you change that value to 2.

Example code:

const Slider = (props) => {
  const {
    minimum, step, maximum
  } = props;
  const start = 1;
  return <Nouislider range={{ min: minimum, max: maximum }} step={step} start={start} />;
};

Now try to render Slider with a dynamic step variable. You will notice that the initialize step value (e.g. 1) is always used as step parameter, even when step = 2

closed time in a day

Jimmy89

issue openedmicrosoft/playwright

[REGRESSION]: Webkit multiple page navigations

Context:

  • GOOD Playwright Version: [0.10.0]
  • BAD Playwright Version: [0.11.0]
  • Operating System: [Mac]

Code Snippet Using this code to navigate multiple pages:

const { webkit } = require('playwright');

(async () => {
    const browser = await webkit.launch();
    const context = await browser.newContext();
    const page = await context.newPage();
    await page.goto('https://whatismybrowser.com/')
    const text = await page.$eval('.guides a', el => el.text)
    await page.goto('http://google.com/')
    const title = await page.title()
    await page.goto('http://github.com/')
    const github = await page.title()
    console.log(text, title, github)
    await browser.close();
})();

Describe the bug It just ok for other browsers: chromium and firefox It was ok for 0.10.0, but for 0.11.0 I got:

(node:4808) UnhandledPromiseRejectionWarning: Error: While navigating to http://google.com/: Navigation interrupted by another one

created time in a day

push eventmmarkelov/jest-playwright

Maksim Markelov

commit sha 94682fbd517f809d4fc7cf2b40de2adfb12f4c74

Update README.md

view details

push time in 3 days

issue closedmmarkelov/jest-playwright

jest-dev-server support

Contemplating to move to Playwright, but due to dependency to jest-puppeteer I need to make sure this plugin will work just as well. I could not find in the documentation if https://github.com/smooth-code/jest-puppeteer#start-a-server is supported. Could this be added and if it already is, the README updated with information about it.

closed time in 3 days

thernstig

created tagmmarkelov/jest-playwright

tagv0.0.9

Running tests using Jest & Playwright 🚀

created time in 3 days

release mmarkelov/jest-playwright

v0.0.9

released time in 3 days

push eventmmarkelov/jest-playwright

mmarkelov

commit sha b03ffea245a8108e33b04b96a50041453f7d8c62

Add jest-dev-server to optional dependencies

view details

mmarkelov

commit sha dabb35acb2406f0d5c238fc71923b869e09e2b66

Merge branch 'master' of https://github.com/mmarkelov/jest-playwright

view details

mmarkelov

commit sha 5ed0c68be746cc26b4b73fed6f763953e2390831

v0.0.9

view details

push time in 3 days

push eventmmarkelov/jest-playwright

mmarkelov

commit sha 11f9f7fd899048cbf492dcdd83f9ce5dd0f85aa9

Remove unnecessary browser closing and adding jest-dev-server support

view details

mmarkelov

commit sha 4da9c4fafe2e7ff180de1ec7bf1c71a938c55890

teardownServer if watch or watchAll does not passed

view details

mmarkelov

commit sha 8ed18dd34d20b972762aaec8c8245547151d4a88

Add jest-dev-server to optional dependencies

view details

Maksim Markelov

commit sha cffc649a41394be57e8d90373d5ce8e533e9f362

Merge pull request #36 from mmarkelov/Support-jest-dev-server Support jest dev server

view details

push time in 3 days

push eventmmarkelov/jest-playwright

mmarkelov

commit sha 8ed18dd34d20b972762aaec8c8245547151d4a88

Add jest-dev-server to optional dependencies

view details

push time in 3 days

push eventmmarkelov/jest-playwright

mmarkelov

commit sha 4da9c4fafe2e7ff180de1ec7bf1c71a938c55890

teardownServer if watch or watchAll does not passed

view details

push time in 4 days

create barnchmmarkelov/jest-playwright

branch : Support-jest-dev-server

created branch time in 4 days

issue commentmmarkelov/jest-playwright

Add configuration option to run all browsers in parallel

Warning disappeared when I removed "firefox". When I added it back it reappeared.

@aesyondu seems like something is wrong with firefox

arjun27

comment created time in 4 days

IssuesEvent

push eventmmarkelov/jest-playwright

mmarkelov

commit sha cfa7637084ebe9d59998cde5adc5706c801c05dc

Close browser in teardown

view details

Maksim Markelov

commit sha a6736ba2fb76541158593981d2768790f2bc9029

Merge pull request #35 from mmarkelov/Close-browser-in-teardown Close browser in teardown

view details

push time in 4 days

PR merged mmarkelov/jest-playwright

Close browser in teardown

Should fix https://github.com/mmarkelov/jest-playwright/issues/19#issuecomment-586144626

+3 -0

0 comment

1 changed file

mmarkelov

pr closed time in 4 days

issue closedmmarkelov/jest-playwright

Add configuration option to run all browsers in parallel

It would be great to be able to run tests in all browsers with just one command.

closed time in 4 days

arjun27

PR opened mmarkelov/jest-playwright

Close browser in teardown

Should fix https://github.com/mmarkelov/jest-playwright/issues/19#issuecomment-586144626

+3 -0

0 comment

1 changed file

pr created time in 4 days

create barnchmmarkelov/jest-playwright

branch : Close-browser-in-teardown

created branch time in 4 days

push eventmmarkelov/jest-playwright

mmarkelov

commit sha b7dac865b2338b5ce835c18f7903415373161e82

Change priority for configured options

view details

Maksim Markelov

commit sha 41c91d133a6d47c0a980ff2e7bee0981f8cebf86

Merge pull request #34 from mmarkelov/Change-priority-for-configured-options Change priority for configured options

view details

push time in 4 days

issue commentmmarkelov/jest-playwright

Add configuration option to run all browsers in parallel

@aesyondu this is not critical, but I suppose something is wrong with teardown function, I'll check it out

arjun27

comment created time in 4 days

issue commentmmarkelov/jest-playwright

Add configuration option to run all browsers in parallel

@aesyondu you should try it with --parallel option: jest-playwright --parallel

arjun27

comment created time in 4 days

issue openedmmarkelov/jest-playwright

Migrate to new playwright version

Playwright 0.11.0 was released, as I know there were some changes with API, so it can need some changes to current implementation #30

created time in 4 days

PR closed mmarkelov/jest-playwright

Ability to specify custom device

I would like to be able to specify a custom device. I'm not sure if this is a good idea, and if it is, if what I did here is the right way to do it. Tell me what you think.

Also, how do I test the jest-playwright.config.js? I could only test the BROWSER DEVICE environment variable (see diff patch).

What I'm currently doing is I have a dummy project, let's say jest-playwright-test, and then I manually npm i -D ../jest-playwright my local forked repo. I'm sure there are more efficient ways to test, but I don't know what they are yet.

+44 -4

5 comments

3 changed files

aesyondu

pr closed time in 4 days

pull request commentmmarkelov/jest-playwright

Ability to specify custom device

@aesyondu I moved it to #32 so I close your PR for now.

aesyondu

comment created time in 4 days

pull request commentmmarkelov/jest-playwright

Ability to specify custom device

@aesyondu I think I could make priority for defined viewport from jest-playwright.config.js, it will be something like this:

module.exports = {
    device: "iPhone 6",
    context:  {
        viewport: {
             width: 1280,
             height: 800,
             deviceScaleFactor: 2,
             isMobile: false,
         }
    }
    ...
}
aesyondu

comment created time in 4 days

pull request commentmmarkelov/jest-playwright

Ability to specify custom device

@aesyondu but you can specify device with your jest-playwright.config.js:

module.exports = {
    device: "iPhone 6",
    ...
}

And also with env variable: DEVICE='iPhone 6' jest

Also I'm working on ability to specify devices, like browsers

aesyondu

comment created time in 4 days

issue commentmmarkelov/jest-playwright

jest-dev-server support

@thernstig there is no jest-dev-server support right now. I'll take it in progress. I suppose it wouldn't take much time to support jest-dev-server

thernstig

comment created time in 4 days

issue commentmmarkelov/jest-playwright

[Question] Should beforeAll still default to 5000ms?

@aesyondu it may be a good idea! I'll take a look

aesyondu

comment created time in 5 days

issue commentairbnb/react-dates

Blocked Dates changes not resetting modifiers correctly

@missbruni could you provide small representation?

missbruni

comment created time in 5 days

created tagmmarkelov/jest-playwright

tagv0.0.8

Running tests using Jest & Playwright 🚀

created time in 5 days

release mmarkelov/jest-playwright

v0.0.8

released time in 5 days

push eventmmarkelov/jest-playwright

maksim.markelov

commit sha dce28b40ed7f2d453e5282eff44a8e53ca790a66

v0.0.8

view details

push time in 5 days

push eventmmarkelov/jest-playwright

Maksim Markelov

commit sha 87d417ac1728353be052efeb5c797cd817be7690

Update README.md

view details

push time in 5 days

push eventmmarkelov/jest-playwright

maksim.markelov

commit sha 5a8257540a7a06c1836e9f8d9a69adacafee4bbd

Add ability to support device from env

view details

Maksim Markelov

commit sha 7ee4523063393a71104befba1bd4e0eed7cea630

Merge pull request #28 from mmarkelov/Add-ability-to-support-device-from-env Add ability to support device from env

view details

push time in 5 days

PR merged mmarkelov/jest-playwright

Add ability to support device from env

Add ability to set device with env variable, like so:

BROWSER=chromium DEVICE='Nexus 4' jest

This is the step to support running tests for multiple devices: https://github.com/mmarkelov/jest-playwright/issues/19

+54 -13

0 comment

4 changed files

mmarkelov

pr closed time in 5 days

PR closed mmarkelov/jest-playwright

Add all flag to run tests for all browsers

Thinking about #19

We can define browsers inside config.js:

module.exports = {
	// browser: 'chromium'
	browsers: ["chromium", "firefox"]
}

So we could access this instances in tests like so:

describe('Google', () => {
	describe('Chrome', () => {
		it('should display "google" text on page', async () => {
                        // just using browser type as prefix
			await chromiumPage.goto('https://whatismybrowser.com/')
			const browser = await chromiumPage.$eval('.string-major a', el => el.text);
			expect(browser).toContain('Chrome')
		})
	})
	
	describe('Firefox', () => {
		it('should display "google" text on page', async () => {
			await firefoxPage.goto('https://whatismybrowser.com/')
			const browser = await firefoxPage.$eval('.string-major a', el => el.text);
			expect(browser).toContain('Firefox')
		})
	})
})

Also we can make browsers option as object to specify configuration for browser, like so:

module.exports = {
	// browser: 'chromium'
	browsers: {
		chromium: {
			launchBrowserApp: {},
			context: {
				...
			}
		},
		...
	}
}

I need to do some checks on it, so... What do you think about it?

+36 -7

3 comments

1 changed file

mmarkelov

pr closed time in 5 days

pull request commentmmarkelov/jest-playwright

Add all flag to run tests for all browsers

Close it for a while, but I should keep it in my mind, it could be helpful

mmarkelov

comment created time in 5 days

PR opened mmarkelov/jest-playwright

Add ability to support device from env

Add ability to set device with env variable, like so:

BROWSER=chromium DEVICE='Nexus 4' jest

This is the step to support running tests for multiple devices: https://github.com/mmarkelov/jest-playwright/issues/19

+54 -13

0 comment

4 changed files

pr created time in 5 days

Pull request review commentopencv/cvat

Typed reducers

-import React from 'react';-import { connect } from 'react-redux';-import { registerAsync } from 'actions/auth-actions';-import RegisterPageComponent from 'components/register-page/register-page';+import React, { ComponentType } from 'react';+import { connect, ResolveThunks } from 'react-redux'; import { CombinedState } from 'reducers/interfaces';+import { registerAsync } from '../../modules/auth/authActions';+import { RouteComponentProps, withRouter } from 'react-router';+import { Col, Row } from 'antd';+import Title from 'antd/lib/typography/Title';+import RegisterForm, { RegisterData } from './register-form';+import Text from 'antd/lib/typography/Text';+import { Link } from 'react-router-dom';+import { compose } from 'redux';  interface StateToProps {     fetching: boolean; }  interface DispatchToProps {-    onRegister: (username: string, firstName: string,-        lastName: string, email: string,-        password1: string, password2: string) => void;+    onRegister: typeof registerAsync; } -function mapStateToProps(state: CombinedState): StateToProps {-    return {-        fetching: state.auth.fetching,+type Props = StateToProps & ResolveThunks<DispatchToProps> & RouteComponentProps;++function RegisterPageContainer(props: Props) {+    const sizes = {+        xs: { span: 14 },+        sm: { span: 14 },+        md: { span: 10 },+        lg: { span: 4 },+        xl: { span: 4 },     };++    const {+        fetching,+        onRegister,+    } = props;++    return (+        <Row type='flex' justify='center' align='middle'>+            <Col {...sizes}>+                <Title level={2}> Create an account </Title>+                <RegisterForm+                    fetching={fetching}+                    onSubmit={(registerData: RegisterData): void => {+                        onRegister(

I suppose using object here will be better

nglazov

comment created time in 5 days

Pull request review commentopencv/cvat

Typed reducers

-import React from 'react';-import { connect } from 'react-redux';-import { registerAsync } from 'actions/auth-actions';-import RegisterPageComponent from 'components/register-page/register-page';+import React, { ComponentType } from 'react';+import { connect, ResolveThunks } from 'react-redux'; import { CombinedState } from 'reducers/interfaces';+import { registerAsync } from '../../modules/auth/authActions';+import { RouteComponentProps, withRouter } from 'react-router';+import { Col, Row } from 'antd';+import Title from 'antd/lib/typography/Title';+import RegisterForm, { RegisterData } from './register-form';+import Text from 'antd/lib/typography/Text';+import { Link } from 'react-router-dom';+import { compose } from 'redux';  interface StateToProps {     fetching: boolean; }  interface DispatchToProps {-    onRegister: (username: string, firstName: string,-        lastName: string, email: string,-        password1: string, password2: string) => void;+    onRegister: typeof registerAsync; } -function mapStateToProps(state: CombinedState): StateToProps {-    return {-        fetching: state.auth.fetching,+type Props = StateToProps & ResolveThunks<DispatchToProps> & RouteComponentProps;++function RegisterPageContainer(props: Props) {+    const sizes = {

It's better to move out of function

nglazov

comment created time in 5 days

issue commentmmarkelov/jest-playwright

[Question] Multiple page.goto in a spec/test file

@aesyondu yeah! You can use browser from global, but I don't want to put it in documentation right now, cause I want keep this package as simple as possible without extra variables and params

aesyondu

comment created time in 5 days

issue commentmmarkelov/jest-playwright

[Question] Multiple page.goto in a spec/test file

@aesyondu I suppose you should close page just after all tests, like so:

describe('Google', () => {
    it('should display "google" text on page', async () => {
        await page.goto('https://whatismybrowser.com/')
        const browser = await page.$eval('.guides a', el => el.text)
        expect(browser).toBe('Get help')
    })

    it('this is the second test', async () => {
        await page.goto('http://google.com/')
        const title = await page.title()
        expect(title).toBe('Google')
    })

    afterAll(async () => {
        await page.close()
    });
})
aesyondu

comment created time in 5 days

push eventmmarkelov/jest-playwright

aesyondu

commit sha 5266531d660be868c6287dcdefe34a4aa9f66d5d

Add clarifying statements to readme Add --save-dev to npm instruction. Add jest as install dependency. Move usage instruction under single header "Usage". Clarify browser type note.

view details

aesyondu

commit sha 697b3499dd7ffc74aa8e1631d4062c1dac4c7f2e

Change --save-dev to -D

view details

Maksim Markelov

commit sha 19bde8b9a00c449eb59a4f2aa719eaaa6efae9e2

Merge pull request #24 from aesyondu/patch-1 Add clarifying statements to readme

view details

push time in 6 days

push eventmmarkelov/jest-playwright

mmarkelov

commit sha 644d2872710c1a39b41f30bb48afe03e36226b53

Separate test bin jest command and fix it

view details

push time in 6 days

push eventmmarkelov/jest-playwright

mmarkelov

commit sha a2154fec93a19d9d843355682550bbf465063898

Add some tests for utils

view details

mmarkelov

commit sha f467a23d76b3573884dc30a5895310f4b8ce9cf8

Add some tests for bin utils

view details

push time in 6 days

issue openedmmarkelov/jest-playwright

Migrate to typescript

Thinking about rewriting current codebase with TS, cause there is no so much code right now, it mustn't take much time with it

created time in 6 days

issue commentmmarkelov/jest-playwright

Add configuration option to run all browsers in parallel

@aesyondu with version 0.0.7 you can check Readme for running for multiple browsers: https://github.com/mmarkelov/jest-playwright#unstable-and-experimental-api

I suppose I can also add support for devices, but before it I need to test current behavior for browsers

arjun27

comment created time in 6 days

issue openedmicrosoft/playwright

[BUG] Firefox crashed when goto file

Context:

  • Playwright Version: [0.10.0]
  • Operating System: [ Mac]

Code Snippet

I got some example.html:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
</head>
<body>
    <h1>Example</h1>
</body>
</html>
const path = require('path')
const { firefox } = require('playwright');

(async () => {
    const browser = await firefox.launch();
    const context = await browser.newContext();
    const page = await context.newPage();
    await page.goto(`file:${path.join(__dirname, 'example.html')}`)
    await page.screenshot({ path: `example.png` });
    await browser.close();
})();

Describe the bug

It is working fine with chromium and webkit, but for firefox i got:

(node:10999) UnhandledPromiseRejectionWarning: TimeoutError: Navigation timeout of 30000 ms exceeded
    at /Users/maksim.markelov/Desktop/test/node_modules/playwright-core/lib/frames.js:898:25
  -- ASYNC --
    at Frame.<anonymous> (/Users/maksim.markelov/Desktop/test/node_modules/playwright-core/lib/helper.js:54:23)
    at Page.goto (/Users/maksim.markelov/Desktop/test/node_modules/playwright-core/lib/page.js:215:33)
    at Page.<anonymous> (/Users/maksim.markelov/Desktop/test/node_modules/playwright-core/lib/helper.js:55:31)
    at /Users/maksim.markelov/Desktop/test/index.js:9:16
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:10999) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

created time in 6 days

push eventmmarkelov/jest-playwright-preset-example

mmarkelov

commit sha 128f1b3d04875e96e4fb9d55aa9bb73506789f47

Update jest-playwright-preset

view details

mmarkelov

commit sha 3212ccd11b24e9888efaad552e7277cc24b98208

Update jest-playwright-preset

view details

push time in 6 days

created tagmmarkelov/jest-playwright

tagv.0.0.7

Running tests using Jest & Playwright 🚀

created time in 6 days

release mmarkelov/jest-playwright

v.0.0.7

released time in 6 days

push eventmmarkelov/jest-playwright

mmarkelov

commit sha f7fb00223d71791c9689b6c0015ebc7d97a07c70

v0.0.7

view details

push time in 6 days

push eventmmarkelov/jest-playwright

mmarkelov

commit sha f4c172419c1a5326d4ce33f51124df7755438a00

All browsers in parallel

view details

mmarkelov

commit sha 845a1cfba568af0dc2627a30b4230167dae7a609

Rewrite and simplify logic to support running multiple browsers

view details

mmarkelov

commit sha 76745ad9408cb750da929b54e9f524555fb9a8e8

Add info about new unstable features

view details

Maksim Markelov

commit sha 6d3f23b596d27b353d94b6d469bf1f5ef0928d3b

Merge pull request #23 from mmarkelov/All-browsers-in-parallel All browsers in parallel

view details

push time in 6 days

PR merged mmarkelov/jest-playwright

All browsers in parallel

Thinking about #19 Try to find out simple way to do it. Get inspired by qawolf and https://github.com/qawolf/qawolf/pull/352/ Just add helper script to run tests for all browsers in parallel, I could also add script for running it one by one. But I'm not sure that it is very convenient and easy way. So you should run this script like so:

"test:all-browsers": "node node_modules/jest-playwright-preset/lib/parallel.js"

And you will get something like this: Снимок экрана 2020-02-11 в 15 12 29

So what do you think about it?

+149 -62

1 comment

7 changed files

mmarkelov

pr closed time in 6 days

push eventmmarkelov/jest-playwright

mmarkelov

commit sha 76745ad9408cb750da929b54e9f524555fb9a8e8

Add info about new unstable features

view details

push time in 6 days

push eventmmarkelov/jest-playwright

mmarkelov

commit sha 845a1cfba568af0dc2627a30b4230167dae7a609

Rewrite and simplify logic to support running multiple browsers

view details

push time in 6 days

pull request commentmmarkelov/jest-playwright

Add clarifying statements to readme

@aesyondu lgtm for me

aesyondu

comment created time in 6 days

Pull request review commentmmarkelov/jest-playwright

Add clarifying statements to readme

 Running your tests using [Jest](https://github.com/facebook/jest) & [Playwright](https://github.com/microsoft/playwright)  ```-npm install jest-playwright-preset playwright+npm install --save-dev jest jest-playwright-preset playwright

I suppose npm install -D jest jest-playwright-preset playwright will be better

aesyondu

comment created time in 6 days

pull request commentmmarkelov/jest-playwright

All browsers in parallel

As a workaround we can use bin:

"bin": {
    "jest-playwright": "./lib/bin/index.js"
  },

bin/index.js:

#!/usr/bin/env node

import { spawnSync } from 'child_process'
const [,, ...args] = process.argv

if (args[0] === '--parallel') {
    const exec = (browser = 'chromium') => {
        spawnSync('node', ['node_modules/.bin/jest'], {
            stdio: 'inherit',
            shell: true,
            env: {
                ...process.env,
                BROWSER: browser,
            },
        })
    }
    exec()
    exec('firefox')
    exec('webkit')
}

Also we could add another option to run it one by one.

And then we can use it like so:

"test:browsers": "jest-playwright --parallel"
mmarkelov

comment created time in 7 days

PR opened mmarkelov/jest-playwright

All browsers in parallel

Thinking about #19 Try to find out simple way to do it. Get inspired by qawolf and https://github.com/qawolf/qawolf/pull/352/ Just add helper script to run tests for all browsers in parallel, I could also add script for running it one by one. But I'm not sure that it is very convenient and easy way. So you should run this script like so:

"test:all-browsers": "node node_modules/jest-playwright-preset/lib/parallel.js"

And you will get something like this: Снимок экрана 2020-02-11 в 15 12 29

So what do you think about it?

+16 -0

0 comment

1 changed file

pr created time in 7 days

create barnchmmarkelov/jest-playwright

branch : All-browsers-in-parallel

created branch time in 7 days

created tagmmarkelov/react-nouislider

tagv3.3.7

React wrapper on NoUiSlider

created time in 7 days

release mmarkelov/react-nouislider

v3.3.7

released time in 7 days

push eventmmarkelov/react-nouislider

mmarkelov

commit sha 00bb92102c3e13070231f932d9bb6783817642b3

Fix #26

view details

mmarkelov

commit sha 190bfc20615c05aa01bd295774e7450f034d5d1b

v3.3.7

view details

push time in 7 days

issue closedmmarkelov/react-nouislider

custom start value and clickablePips

Bug:

Based on example Change start by changing state:

Add clickablePips and pips={{ mode: 'count', values: 5 }}

Pips is clickable

Click Change state

Pips is broken

closed time in 7 days

dartess

pull request commentmmarkelov/jest-playwright

docs: added 'useStandaloneVersion' option

@mxschmitt thank you as always! But I just rewrote this functionality without extra flags: https://github.com/mmarkelov/jest-playwright/pull/14#issuecomment-583840235 I think we should keep it as simple as possible, without overhead settings.

mxschmitt

comment created time in 7 days

issue closedmmarkelov/jest-playwright

Testing jest-playwright

https://github.com/mmarkelov/jest-playwright/issues/1#issuecomment-583255213

closed time in 7 days

mmarkelov

issue commentmmarkelov/jest-playwright

Testing jest-playwright

@mxschmitt I suppose we can close it, cause I opened this issue for creation just starter tests

mmarkelov

comment created time in 7 days

issue closedmmarkelov/react-nouislider

ref not being able to call onUpdate

I am not able to call ref in onUpdate upon using instanceRef.

const [ref, setRef] = useState();

<NoUiSlider
  instanceRef={instance => {
    if (instance && !ref) {
      setRef(instance);
    }
  }}
  // ...
  onUpdate={() => {
    console.log(ref);  // returns undefined... 😭
  }}
/>

closed time in 8 days

nuotsu

issue commentmmarkelov/react-nouislider

ref not being able to call onUpdate

Close to inactivity

nuotsu

comment created time in 8 days

issue commentmmarkelov/react-nouislider

Update of step is not being forwarded to noUIslider

@Jimmy89 should be fixed in 3.3.6

Jimmy89

comment created time in 8 days

created tagmmarkelov/react-nouislider

tagv3.3.6

React wrapper on NoUiSlider

created time in 8 days

more