Cypress: Cannot read property 'map' of null at parseMatrix2D

Created on 16 Mar 2020  路  4Comments  路  Source: cypress-io/cypress

Current behavior:

Trying cy.get('.selector') - fail with TypeError: Cannot read property 'map' of null

When the "vue-fragment" component is included in the project, cypress, for some reason, cannot parse

image

Test code to reproduce

I created a repository to reproduce:
https://github.com/shoomakov/cypress-issue

npm i
npm run serve

cd tests/e2e
npm i
npm run dev


Versions

Cypress v.4.0.2
Browser Chrome

regression v3.8.2

Most helpful comment

The cause of this problem is that vue-fragment creates a DOM element that returns empty CSSStyleDeclaration.

I'm trying to mock this behavior.

All 4 comments

I can recreate this. This was introduced in Cypress 3.8.2 - like by this PR https://github.com/cypress-io/cypress/pull/5916 cc @sainthkh

This error is being thrown here: https://github.com/cypress-io/cypress/blob/develop/packages/driver/src/dom/transform.ts#L180:L180

In this case the transform = "", which evaluates to null within transform.match(numberRegex)

One of the elements has empty strings for all these values for some reason.

Screen Shot 2020-03-17 at 3 16 35 PM

3.8.1

Incorrectly determined element as not visible.

Screen Shot 2020-03-17 at 3 05 23 PM

3.8.2

Erroring with 'Cannot read property map of null'

Screen Shot 2020-03-17 at 2 50 31 PM

The cause of this problem is that vue-fragment creates a DOM element that returns empty CSSStyleDeclaration.

I'm trying to mock this behavior.

The code for this is done in cypress-io/cypress#6787, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

Released in 4.3.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v4.3.0, please open a new issue.

Was this page helpful?
0 / 5 - 0 ratings