-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Description
I have both e2e and component tests inside a NX library and I want to execute both of them inside the same sorry-cypress run.
Having different specs in the same "group" is not allowed, so currently I have to create a second target "currents-ct" which has the group set to i.e. "mylib-ct" to dinstinguish it from the group "mylib-e2e".
Probably I could also solve the issue by not setting any group at all, but I think it can help with an overview of which libraries were tested (basically every library we have is also represented as a group and we run tests with "nx affected")
I would like to be able to set the groups within the nx/currents plugin dynamically based on the project name and the actual testing type. This way I could run both testing types within the same sorry-cypress run using just two commands
nx affected --target=currents --ci-build-id=someId --testingType=e2e
nx affected --target=currents --ci-build-id=someId --testingType=component
And the groups in sorry-cypress would be like:
mylibA-e2e
mylibA-ct
mylibB-e2e
mylibB-ct
There could be a flag in project.json to activate the dynamic group assignment..
One might argue that it's wrong to have e2e tests within a library, but we found it is a good solution to reduce testing times by only executing the affected tests of a specific library (even though there might be a gap, but we're willing to take the risk). The "NX way" doesn't really scale if you have a lot of e2e tests.
Is this a feature you'd like to see in this plugin?
Example usage
see above