Giter Club home page Giter Club logo

Comments (10)

benmonro avatar benmonro commented on June 2, 2024 1

@rssfrncsrenishaw I have released a new version (3.0.0) that should support your issue. The breaking changes are that addTestcafeTestingLibrary has been removed in favor of clientScripts which is now supported in testcafe 1.4.x.

To test this, you will need to update to testcafe 1.4.x (if you haven't already) and then do npm i -D @testing-library/testcafe@next

see the docs here: https://testing-library.com/docs/testcafe-testing-library/intro#for-v3x-requires-testcafe-140-or-greater

from testcafe-testing-library.

rssfrncsrenishaw avatar rssfrncsrenishaw commented on June 2, 2024

Interestingly if I manually add after the reload it works...

await t.eval(() => location.reload(true));
await addTestcafeTestingLibrary(t)
await t
    .expect(getAllByTestId("foo")).ok()

This is not ideal.

from testcafe-testing-library.

benmonro avatar benmonro commented on June 2, 2024

Thanks for reporting! I will look into this

from testcafe-testing-library.

rssfrncsrenishaw avatar rssfrncsrenishaw commented on June 2, 2024

I posted it on stackoverflow and was told to look into https://devexpress.github.io/testcafe/documentation/using-testcafe/common-concepts/inject-scripts-into-tested-pages.html

from testcafe-testing-library.

benmonro avatar benmonro commented on June 2, 2024

Yes they just added that feature. The fix will probably involve that

from testcafe-testing-library.

benmonro avatar benmonro commented on June 2, 2024

@rssfrncsrenishaw feel free to give this issue a 👍 as it will help fix your problem cleanly. :)

from testcafe-testing-library.

rssfrncsrenishaw avatar rssfrncsrenishaw commented on June 2, 2024

nice work!

from testcafe-testing-library.

benmonro avatar benmonro commented on June 2, 2024

Does that mean it works for you? 🙂

from testcafe-testing-library.

rssfrncsrenishaw avatar rssfrncsrenishaw commented on June 2, 2024

Unable to upgrade to 1.4.X at the moment so can't test it...

from testcafe-testing-library.

benmonro avatar benmonro commented on June 2, 2024

ok, well I added a test for your use case and the new client script injection should fix this, so closing for now, but if you do run into issues again feel free to reopen.

Fixed in https://github.com/testing-library/testcafe-testing-library/releases/tag/v3.0.0%40next

from testcafe-testing-library.

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.