-
Notifications
You must be signed in to change notification settings - Fork 674
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
Testcafe freezes on basic test with Ionic ActionSheet #2251
Comments
I was able to reproduce the issue in debug mode, but in normal mode, test passed well. I've checked in Chrome under Windows and OSX. If you can reproduce it without the debug mode, would you please provide a screencast?
This class prevents clicks on any element except an ionic panel with actions (Share, Move, Delete, Cancel). So, it seems that testcafe hangs in debug mode. To overcome the issue you can use the temporary workaround. Override const button = Selector('button');
const actionButton = button.withText('Show Actionsheet');
const cancelButton = button.withText('Cancel');
const bodySelector = Selector('body').addCustomMethods({
allowClick: (body) => {
body.style.pointerEvents = 'auto';
}
});
fixture `Getting Started`
.page `http://localhost:8100/`;
test('Tabs test', async t => {
await bodySelector.allowClick();
await t
.click(actionButton)
.wait(1000)
.click(cancelButton)
.wait(3000)
}); If the issue persists, feel free to contact us. |
Thank you @AlexKamaev. I can confirm that Testcafe does NOT hang when run outside of debug mode, and that your suggestion does enable debug mode to work as desired, very helpful. I was in debug mode because I was trying to solve another problem with Action Sheets but I figured that out I believe. |
@AlexKamaev I have noticed a related issue (i think the original reason I was in debug mode). It appears that clicking on an Action Sheet item causes the button's buttonClicked method to be called twice. Running outside Test cafe it is only executed once. to reproduce:
Then the observed output shows the print statement twice ("BUTTON CLICKED 1") after click(moveButton) is called. Outside of testcafe it is shown only once. I do not know if this is related to the pointer event issue you raise above. Let me know if I should create a separate issue for this? |
Hi, I see the problem. It appears to be connected with the #2232 issue and will be fixed in its context. |
I can confirm this works now, after re-installing testcafe. Thank you! (CORRECTION: The freeze is OK, but the button is still being virtually clicked twice.) |
@AlexKamaev Update: I mistakenly thought this was corrected. But when I run the above, I still see the BUTTON CLICKED 1 message twice, indicating the menu has been clicked twice, so the fix for #2232 doesn't seem to have solved it... |
@viking2917 We'll investigate it in context of #2232 |
update @AlexKamaev @Farfurix Sorry I am an idiot. I had a local installation of testcafe 0.19.1 covering a global installation of 0.19.2. When I removed that and made sure to have 0.19.2 everything works. Thanks and sorry for confusion! |
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. |
Are you requesting a feature or reporting a bug?
Bug
What is the current behavior?
After selecting a button that activates an Ionic Actionsheet (the standard blocking menu for Ionic), Testcafe freezes, in both debug mode and normal mode
What is the expected behavior?
Test should run to completion.
How would you reproduce the current behavior (if this is a bug)?
install a basic ionic app template, e.g. "ionic start actionSheetTest blank --type ionic1".
The replace the www directory with the attached zip files. This is essentially the standard Ionic demo for action sheets, from: https://codepen.io/ionic/pen/jLylA. (nightly tests).
Provide the test code and the tested page URL (if applicable)
See attached zip files for complete code set. The test code is below. When run, the action sheet will appear (the test code activates it), but the cancel button item is never reached, and the Chrome window running test cafe freezes, in the state shown in the attached screenshots.
www.zip
tests.zip
Tested page URL:
Test code
Specify your
The text was updated successfully, but these errors were encountered: