Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Injected Client Script only works the first time in Live Mode #4183

Closed
testorangemac opened this issue Aug 21, 2019 · 4 comments
Closed

Injected Client Script only works the first time in Live Mode #4183

testorangemac opened this issue Aug 21, 2019 · 4 comments
Assignees
Labels
AREA: client AREA: server STATE: Auto-locked An issue has been automatically locked by the Lock bot. SYSTEM: runner TYPE: bug The described behavior is considered as wrong (bug).
Milestone

Comments

@testorangemac
Copy link

testorangemac commented Aug 21, 2019

What is your Test Scenario?

I like to inject a Client Script and use it in Live Mode

What is the Current behavior?

The injection works when TestCafé starts the Live Mode and runs the test for the first time, but a second time the element is not found and an error is produced:

 ReferenceError: TestingLibraryDom is not defined

What is the Expected behavior?

Injection keeps working in combination with Live Mode

Steps to Reproduce:

  1. Update config file and add:
"clientScripts": [
    "./node_modules/@testing-library/dom/dist/@testing-library/dom.umd.js"
  ],
  1. Import methods:
import { getByTestId } from "@testing-library/testcafe";

See https://testing-library.com/docs/testcafe-testing-library/intro for other queries to be used

  1. Call method:
  async startBtn() {
    await t.click(getByTestId("btn"));
  }

Someone had a similar issue: testing-library/testcafe-testing-library#28
so we upgraded the testcafe-testing-library to 3.0.0 as suggested, but the problem unfortunately still persisted.

Your Environment details:

  • testcafe version: 1.4.1
  • testcafe-testing-library: 2.1.1 and 3.0.0
  • node.js version: 10.5.0
  • command-line arguments: -L
  • browser name and version: All
  • platform and version: Win10
  • other:
@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Aug 21, 2019
@AndreyBelym AndreyBelym self-assigned this Aug 22, 2019
@AndreyBelym AndreyBelym added STATE: Needs discussing An issue that requires discussion by the team. and removed STATE: Needs discussing An issue that requires discussion by the team. labels Aug 22, 2019
@AndreyBelym
Copy link
Contributor

AndreyBelym commented Aug 22, 2019

Thank you for your report, I've reproduced the issue. We will try to address it in the next development sprint.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Aug 22, 2019
@AndreyBelym AndreyBelym added AREA: client AREA: server SYSTEM: runner TYPE: bug The described behavior is considered as wrong (bug). labels Aug 22, 2019
@AndreyBelym AndreyBelym added this to the Sprint #40 milestone Aug 22, 2019
@AndreyBelym AndreyBelym removed their assignment Aug 22, 2019
@miherlosev miherlosev self-assigned this Aug 23, 2019
@miherlosev miherlosev self-assigned this Aug 28, 2019
@benmonro
Copy link
Contributor

@AndreyBelym was this addressed?

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Sep 11, 2019
@Farfurix Farfurix self-assigned this Sep 12, 2019
@Farfurix
Copy link
Contributor

Farfurix commented Sep 12, 2019

@benmonro

Hello,
 
The issue is fixed in the 41b9f22 commit. We included the fix in our next version. So, please wait for the v1.5.0 release.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Sep 12, 2019
@Farfurix Farfurix removed their assignment Sep 12, 2019
@lock
Copy link

lock bot commented Sep 22, 2019

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.

@lock lock bot added the STATE: Auto-locked An issue has been automatically locked by the Lock bot. label Sep 22, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Sep 22, 2019
kirovboris pushed a commit to kirovboris/testcafe-phoenix that referenced this issue Dec 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AREA: client AREA: server STATE: Auto-locked An issue has been automatically locked by the Lock bot. SYSTEM: runner TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

5 participants