Hi Koushik I observed in my script, playwright script is getting stuck and not proceeding to next test block when it is unable to locate the right locator. Any resolution for this.? In afterEach i have placed context close and page close.
Thanks for prompt response 🙏 More specific while preset for both jest-preset-angular and jest-playwright-preset Have to manually change that preset option
Preset allows only string, so we can not do it directly but we can set up multiple config file. One for unit and another for functional. Found a reference medium, probably it might help you. medium.com/coding-stones/separating-unit-and-integration-tests-in-jest-f6dd301f399c
@@letcode actually I was looking a case if out of n-tests any of test fails, it should stop the complete execution, no need to execute further tests like we do in jest by "bail".
Hi Koushik, can we continue our test if one of the test case failed it actually exit the automation when any one of the test failed. I am migrating from Protractor to Playwright, in protractor when test fail it continue with the next it block with flag as realTimeFailure: true
@@letcode Did you find any solution for it, actually my test are dependent, any one of them failing exit the automation which I don't want. Also in next test block page will be continue till what previous test left, right? So that we can do continue test flow in chunks of test blocks
@@letcode 😭 why the super brain tool inventor forget this basic features in the tools. E2E is completely based on entire test flow, it is not necessary to make test cases independent all the time for a large scenario. Protractor is very robust, unfortunately it is going to be end by end of 2022.
By default, Jest runs all tests and produces all errors into the console upon completion. The bail config option can be used here to have Jest stop running tests after n failures. Setting bail to true is the same as setting bail to 1. From official documents
I want to add screenshot only on failure cases in jest allure. Can you pls tell me how to do ??
Not possible directly, but I'll look into it ☺️
Thank You, Kaushik Sir. 🙏
Welcome bro 😀
Hi Koushik I observed in my script, playwright script is getting stuck and not proceeding to next test block when it is unable to locate the right locator. Any resolution for this.? In afterEach i have placed context close and page close.
I believe your timeout is more so if locator is not present then it will wait the timeout is expired.
I was wondering if you are planing present a video about waitForNav, waitForResponse and others wait methods?
Yes, however while writing test I have already shown few wait demo.
Hi, is there anyway not to rerun the beforeall if one test is failed in the test file?
No direct implementation, Boolean might useful, but i haven't tried.
hi, do we have any way for...how to rerun the failed test cases in playwright jest?
I don't think so, we don't have that feature in jest
@@letcode ..okay then ..is there any other way...like if we can do it by jenkins ?
No, Jenkins is just a CI CD tool. I'll check if there is any other way.
@@letcode yes please.i need t implement it in my current project.please let me know if there any...
Hi Koushik,
I am facing issue while configuring jest for unit tests and playwright jest for functional test.
Need guidance
What is the issue.
Common issue is... You should install the dependencies as dev dependencies.
Thanks for prompt response 🙏
More specific while preset for both jest-preset-angular and jest-playwright-preset
Have to manually change that preset option
Oh... I don't think so we have a option to set 2 preset. Let me check the docs.
@@letcode please will wait for your response 🙏
Preset allows only string, so we can not do it directly but we can set up multiple config file.
One for unit and another for functional.
Found a reference medium, probably it might help you.
medium.com/coding-stones/separating-unit-and-integration-tests-in-jest-f6dd301f399c
Is there a way to have "Skip on Failure" in playwright-testrunner as we have in jest ?
No direct implementation I guess, as all the test are independent. But we can use the test.skip() annotations.
@@letcode actually I was looking a case if out of n-tests any of test fails, it should stop the complete execution, no need to execute further tests like we do in jest by "bail".
@@tanujlakshakar8473 may be we can request a feature.
Hi Koushik, can we continue our test if one of the test case failed it actually exit the automation when any one of the test failed. I am migrating from Protractor to Playwright, in protractor when test fail it continue with the next it block with flag as realTimeFailure: true
I'll look into it.
@@letcode Did you find any solution for it, actually my test are dependent, any one of them failing exit the automation which I don't want. Also in next test block page will be continue till what previous test left, right? So that we can do continue test flow in chunks of test blocks
If u r using a playwright fixture, it won't happen. all the tests were independent. If one test fails it continues with the other tests.
@@letcode 😭 why the super brain tool inventor forget this basic features in the tools. E2E is completely based on entire test flow, it is not necessary to make test cases independent all the time for a large scenario. Protractor is very robust, unfortunately it is going to be end by end of 2022.
You can break down the tests using test.steps that will be handy to write big tests.
Hi, Koushik! I think that instead of these 2 lines of code(bail: true, bail: 1) one is enough(bail: 1), they are identical. Am I right?
By default, Jest runs all tests and produces all errors into the console upon completion. The bail config option can be used here to have Jest stop running tests after n failures. Setting bail to true is the same as setting bail to 1.
From official documents
@@letcode thank you!