-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
File is uploaded but the angular class ng-invalid is not changed to ng-valid after upload #300
Comments
Hi @Nikeshbajra Can you please describe your setup? Like:
|
I have a very close issue with an Angular popup and a file upload inside it. Current behavior:After selecting a file name with this cypress call The same function used on a page and not in a popup works perfectly. @Nikeshbajra are you in a popup? Desired behavior:The "Save" button should be enabled after file selection. Steps to reproduce: (app code and test code)Open the popup with the file selection.
VersionsCypress 6.9.1 |
My Code: I am using the cypress-file-upload plugin The blue color in the "Browse" button here is due to the hover effect @StephaneColson my problem isn't the save button being disabled, instead it is the image being uploaded but the front-end not recognizing it. |
@Nikeshbajra ok but maybe the same issue cause. |
I had a similar problem using Angular: the form was not validating even though the file upload control appeared to have been entered correctly. I was able to work around the issue by triggering the 'input' event. cy.get('#fileUploadElement')
.attachFile('file_name.pdf')
.trigger('input'); I'm not sure if this is something that ought to be supported by cypress-file-upload or if it's just an Angular implementation detail. At any rate, hope that helps. |
Thank you @0xbane it solved the problem for me. I couldn't find the solution anywhere else |
I face same issue, however i have my type=file element was hidden. so the trigger should be the button. is it possible to attach to the hidden element? |
I have uploaded the image using the plugin but angular doesn't seem to change the class from ng-invalid to ng-valid
The text was updated successfully, but these errors were encountered: