-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
[Feature] Does upload.() return a promise? #97
Comments
Hey @kyledavelaar We discussed that stuff in #91, here's the answer:
Does this help to you? |
Hi @abramenal |
@kyledavelaar |
Cool thanks so much
…On Wed, Aug 7, 2019, 12:02 abramenal ***@***.***> wrote:
@kyledavelaar <https://github.com/kyledavelaar>
Oh I see what you mean. Yes, then likely I need to go through the Promise
chain in order to resolve it properly – will likely pick that up this week.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#97?email_source=notifications&email_token=AFOIAGDM24AEVEVICOSPG43QDML4ZA5CNFSM4IJOL6W2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3ZMWPI#issuecomment-519228221>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFOIAGDXBCZ2S3UKINONS3DQDML4ZANCNFSM4IJOL6WQ>
.
|
@kyledavelaar I feel a bit of misconception here. Ideally you don't need to control the async flow this way – Cypress does that for you for most cases. See So can you try out this:
After that, the problem I see here is that your If we omit async part, Waiting for your reply. |
Sorry was out on holiday and couldn't investigate more. I see what you mean about the way Cypress handles async. To answer your questions I'm using the latest version of cypress-file-upload, the size of the csv is 88 bytes, and the data-attribute is for the container that holds the NEXT button. |
@kyledavelaar is the issue still relevant to you? |
Hi thanks for asking. Feel free to close the issue.
…On Sat, Sep 21, 2019 at 8:33 AM abramenal ***@***.***> wrote:
@kyledavelaar <https://github.com/kyledavelaar> is the issue still
relevant to you?
If yes, you could take a look on #104
<#104> bug
description, there is a nice way to do the thing which is likely to be same
as yours.
If that does not help still, please reopen this one with details.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#97?email_source=notifications&email_token=AFOIAGAYOVVVSAOW5ZQ3PQ3QKY5C5A5CNFSM4IJOL6W2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7IT7FA#issuecomment-533806996>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFOIAGHWTZ576ZOEZLGGVULQKY5C5ANCNFSM4IJOL6WQ>
.
|
i'm getting this error when trying to upload csv file |
Hi @BavithraDuraisamy |
Desired behavior:
Great library! Thanks for making this. Not sure if this is a bug or could be a new feature. I'd like upload() to wait until the file has been uploaded and then do something like click a button on the page. In the code below it seems that upload() is not waiting for the file to finish uploading before going into the second .then() block.
Current behavior:
cy.fixture('./3row.csv').then(fileContent => { cy.get('input[type="file"]').upload({ fileContent, fileName: './3row.csv', mimeType: 'text/csv' }).then(content => { cy.get('[data-cy="map-headers-container"]').contains('NEXT').click({force: true}); }) }); })
Versions
cypress 3.4
The text was updated successfully, but these errors were encountered: