Git Product home page Git Product logo

Comments (3)

kettanaito avatar kettanaito commented on May 17, 2024

I may take this setup as the part of #17.

from atomic-layout.

kettanaito avatar kettanaito commented on May 17, 2024

I've installed and configured Cypress, and currently experience the following issue:

tests?p=cypress/integration/index.js-715:2609 It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles not rendering properly, errors happening during rehydration process and makes you application bigger without a good reason.

See https://s-c.sh/2BAXzed for more info.

from atomic-layout.

kettanaito avatar kettanaito commented on May 17, 2024

Multiple styled-components instances were caused by importing Layout class (from the built library) from within the Cypress commands directory. Layout imports styled-components under the hood, therefore Cypress ended up with multiple instances of styled-components.

The solution was to get the breakpoints objects directly from source of the library, to prevent importing extra instance of styled-components. Overall, that solved multiple instances problem, but tests still behaved wrong in Cypress.

Therefore, I've established a separate app which loads the built library and has test scenarios configured. Then Cypress visits that app and tests there to ensure proper styling, behavior and actually end-to-end usage.

from atomic-layout.

Related Issues (20)

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.