Repository navigation
Update DB capture to run before spec in local - #10321
Conversation
4a1bbd9 to
67b22eb
Compare
|
Checked commit asirvadAbrahamVarghese@67b22eb with ruby 3.3.12, rubocop 1.91.0, haml-lint 0.78.0, and yamllint 1.37.1 |
|
Make sense to me. @asirvadAbrahamVarghese since this is conditional on CI, we need to be careful about other run/open modes. I feel like we only want to do this in open mode. Thoughts? |
67b22eb to
44a80f2
Compare
Good call, that’s even better |
| on('before:run', () => captureDbState()); | ||
| } else if (config.isInteractive){ | ||
| // open mode (cypress open) — capture per-spec to pick up any manual UI changes | ||
| on('before:spec', () => captureDbState()); |
There was a problem hiding this comment.
do we need an else for when it's not CI and not interactive (open)?
Or easier, would swap it and do if interactive, use before:spec, else, before:run?
There was a problem hiding this comment.
You're right. My bad
There was a problem hiding this comment.
It's all good. Looks good to me!
44a80f2 to
58b2038
Compare
| on('before:run', () => captureDbState()); | ||
| } else if (config.isInteractive){ | ||
| // open mode (cypress open) — capture per-spec to pick up any manual UI changes | ||
| on('before:spec', () => captureDbState()); |
There was a problem hiding this comment.
It's all good. Looks good to me!
|
bumping after ManageIQ/manageiq#24003 merge |
#10026 follow-up
What I’m running into with db_state capture in
before:runis that thecy.appDbState('restore')call ends up clearing other data created through the UI while Cypress is still open:For example:
I feel like, for local runs, capturing the DB state before each spec would be better