-
Notifications
You must be signed in to change notification settings - Fork 14
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
Extract cypress integration into separate @bigtest/cypress
package in separate workspace
#759
Comments
@cowboyd thanks for the write-up. Let me feed this back to you to double-check I have understood the requirement:
|
@dagda1 Yes. I'm thinking that this should be in our monorepo, but it should exist in a separate workspace. That way, we don't have to pull in all of cypress's dependencies. Our current dev dependency on What if we create a separate workspace for integrations? E.g. {
"workspaces": {
"packages": [
"packages/*",
],
"integrations": [
"integrations/cypress",
"integrations/jest",
"integrations/whatever",
]
}
} We might even want to put the sample app in there, since that's where it will share its true dependencies. The only real drawback I see is that if we're working on an integration, and it requires an upstream fix to |
What should we do about the bigtest packages that uses the sample app for its tests? |
They would do an install of the sample app as part of their test setup, but since the sample app would not have cypress or jest in its dependencies (only its dev dependencies), those would not come through. |
@cowboyd if "workspaces": {
"packages": [
"packages/eslint-plugin",
"packages/cypress",
.... Then cypress will get installed and hoisted when you do a I think we can include in the monorepo but not as part of the packages @minkimcello does the sample app use |
The sample app uses |
@minkimcello oh sorry, I remember you saying. Great, that is good news. |
I presume since we are pursuing this route, that we can close the cheeky halfway there version in #726? |
@dagda1 why not put it in a separate "integrations" workspace and not the main "packages" workspace? Would that not be a clean solution? |
yes sorry, that makes total sense. I thought you meant something else other than a
|
So would this mean a user wanting to use interactors in cypress will need to install both |
We could do it that way, but I was thinking that we just re-export the interactor functions directly from the import { TextField } from '@bigtest/cypress' One we have this, we could propose that we move the integration over to |
Oh oops, there was a typo in my question. I was asking whether the user will need to install |
Our goal with cypress integration was to make using interactors as easy as possible. That's why our original design involved required nothing more than just importing interactors from the
bigtest
package:While this was easy, it turns out not to be that simple, as it introduces a number of complexities.
bigtest
->cypress
and so we just detect at runtime if cypress is there and then extend it. While that is kinda cool, what happens if the cypress API changes? We have no way of knowing until runtime. What if we want to support more than one version? This puts us in the unenviable position of having to dynamically link every possible version of cypress in every possible version of bigtest.node_modules
and makes CI cycles significantly longer.A solution to both of these problems is to move our integration into a separate
@bigtest/cypress
package. This package can depend on a specific version range of bigtest interactors and a specific version range of cypress. That way, if we need to change the cypress integration, we can just release a new version of@bigtest/cypress
but anybody who needs to use the old integration is still good to go.If we put the package in a separate
integrations
workspace, then it can be built and cached separately.@bigtest/cypress
The text was updated successfully, but these errors were encountered: