Open vanakema opened 3 years ago
What about adding Cypress support to the typescript
generator, which already supports the following?
framework
Specify the framework which should be used in the client code. (Default: fetch-api)
fetch-api - fetch-api
jquery - jquery
That would be great. That solution would still require the cypress webpack plugin, but that’s totally acceptable compared to the logging issue.
On Nov 25, 2020, at 2:01 AM, William Cheng notifications@github.com wrote:
What about adding Cypress support to the typescript generator, which already supports the following?
framework Specify the framework which should be used in the client code. (Default: fetch-api) fetch-api - fetch-api jquery - jquery — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
any news?
Would be awesome!
+1
+1
+1
+1
+1
Is your feature request related to a problem? Please describe.
We've found ourselves frustrated in having to write a manual API for doing state setup in our Cypress E2E tests.
Describe the solution you'd like
A Typescript Cypress generator that creates a library that uses
cy.request
for requests, and includes all the models as well, so we get type completionDescribe alternatives you've considered
We're currently using the ts-node generator and using
cy.then
to make requests in cypress through the ts-node generated library, but this doesn't use cypress'scy
worker and logging, which makes debugging issues much harder, as you do not know what request failed, and command ordering is more unpredictable.Additional context
All
cy
commands in cypress, go into a worker queue, for the Cypress runner to execute in FIFO order, rather than using the native async/await, which can obscure the execution order of commands if not using allcy
commands, as well as obscures errors that occur.I think all that really needs to happen is for the generator to make
cy.request
commands instead of node's built inrequest
libraryIntro to what Cypress is: https://docs.cypress.io/guides/core-concepts/introduction-to-cypress.html#Cypress-Can-Be-Simple-Sometimes
Explanation of Cypress's worker/runner: https://docs.cypress.io/guides/core-concepts/test-runner.html#Overview