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
page loaded event #3758
Comments
Thank you for your proposal. We'll consider its implementation with the team if the idea becomes popular. |
Hi @AlexKamaev Thank you. Are there any work arounds you know of that I can use in the meantime to allow me to inject scripts into the page whenever a navigation event occurs? |
You can try to wrap the const clickThatLeadsToReload = async (t, selector) => {
await t.click(selector);
await addTestcafeTestingLibrary(t);
};
await clickThatLeadsToReload(t, getByText("link to other page")); |
@AlexKamaev I'd be happy to submit a PR of you could point me in the right direction... Like where does testcafe interact with hammer head? |
found a solution using the testRun class. |
@benmonro Can https://testing-library.com/docs/testcafe-testing-library/intro#known-issues be removed since it looks like you fixed this in testing-library/testcafe-testing-library@5998cfd ? |
Ah yes. Nice catch. Thanks |
@benmonro No, thank you. Really excited to use these two tools together. 🙇♂️ |
Removed since the [issue](DevExpress/testcafe#3758) was already resolved.
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. |
What is your Test Scenario?
For testcafe-testing-library, I'd like to support a use case for when navigation occurs (clicking a link, reloading, etc). In order to do this, I need to inject dom-testing-library into the DOM on each page-load
What are you suggesting?
I propose adding an event subscription which I can subscribe to in a test or hook.
What alternatives have you considered?
I have a work around, but it requires manually injecting after the link click, it works, but it's toothy and cumbersome. For example, in the example above, i have to do this:
quite verbose as you can see. hence the desire to have an event I can subscribe to for whenever a page load occurs....
Additional context
The text was updated successfully, but these errors were encountered: