Skip to content
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

feat(testing): Add describeScenario utility to group scenario tests #9866

Merged
merged 16 commits into from
Jan 22, 2024

Conversation

dac09
Copy link
Collaborator

@dac09 dac09 commented Jan 22, 2024

See discussion here: https://community.redwoodjs.com/t/api-testing-and-scenarios/5553

Tasks

  • Add docs.
  • Should add to e2e tests? Not sure how else to test
  • Wait for discussion during CTM to make sure API seems right.

Usage

describeScenario<StandardScenario>('contacts', (getScenario) => {
  it('xxx', () => {
  //  
   const scenario = getScenario() 
   /...
  })

This will load, and seed the scenario once and allow you to write multiple expecations inside the describeScenario block.

dac09 and others added 9 commits November 22, 2023 16:23
…nario-multiple-tests

* 'main' of github.com:redwoodjs/redwood: (21 commits)
  fix(deps): update dependency @whatwg-node/server to v0.9.18 (#9602)
  fix(deps): update dependency @apollo/client to v3.8.8 (#9600)
  chore: update yarn.lock
  chore(deps): update dependency @playwright/test to v1.40.1 (#9599)
  chore(deps): update dependency @supabase/supabase-js to v2.39.0 (#9603)
  fix(deps): update dependency @clerk/clerk-sdk-node to v4.12.22 (#9601)
  chore(deps): update dependency @clerk/clerk-react to v4.28.1 (#9598)
  fix(deps): update storybook monorepo to v7.6.2 (#9597)
  RSC: Generate a route manifest (#9592)
  chore(private-set): Wrap profile page in <PrivateSet> instead of Private (#9575)
  add documentation on mocking useParams in component test (#9284)
  Update Typescript to 5.3.2 (#9589)
  RSC: Refactor build process (#9588)
  fix(crwa): clarify docs to avoid issues in yarn modern installs (#9579)
  fix: Prevent `rw graphiql setup` from breaking with encryptSession error (#9582)
  fix: Remove "god code" typos from auth READMEs (#9583)
  Experimental Dockerfile: Fix typo in setup command (#9577)
  fix(streaming-ssr): Fixes running the streaming server using rw serve (#9558)
  9316/update mantine setup (#9388)
  chore: clean up `RouteParams` type test structure (#9573)
  ...
…edwood into try/setupScenario-multiple-tests

* 'try/setupScenario-multiple-tests' of github.com:dac09/redwood: (235 commits)
  chore(project-config): switch to vitest (#9864)
  chore(ci): Fix CRWA telemetry check (#9865)
  chore(crwa): update e2e test to handle yarn install patch (#9862)
  feat(crwa): Always install using yarn v4 (#9861)
  fix(cli): Skip Studio when running `rw upgrade` (#9860)
  fix(studio): Upgrade to 11.0.1 and enable web-side (#9858)
  feat(server file): add `createServer` (#9845)
  chore(crwa): set `REDWOOD_CI` and `REDWOOD_DISABLE_TELEMETRY` (#9857)
  Fix(crwa): Exit 0 after Quit install (#9856)
  chore(crwa): switch to vitest (#9855)
  chore(api): Switch to use vitest over jest (#9853)
  fix(server): ensure consistency between CLI serve entrypoints regarding help and strict (#9809)
  Improve how the api-server watch command works (#9841)
  docs(typo): correct grammar in realtime docs (#9850)
  Add support for Prisma Bytes and GraphQL scalar Byte (#9847)
  packages/cli: Switch from substr (deprecated) to slice (#9849)
  mapPrismaScalarToPagePropTsType: Fix Decimal test case (#9846)
  chore(build): Avoid prebuilding api side, instead use an esbuild plugin (#9767)
  Fix url query param encoding (#9844)
  chore(fwtools): handle existing resolutions in tarsync (#9840)
  ...
@dac09 dac09 mentioned this pull request Jan 22, 2024
2 tasks
@dac09 dac09 added the release:feature This PR introduces a new feature label Jan 22, 2024
@dac09 dac09 added this to the next-release milestone Jan 22, 2024
Fix issues in examples
…e-scenario

* 'main' of github.com:redwoodjs/redwood:
  chore(vite): switch to vitest (#9868)
  chore: switch some more packages to vitest (#9867)
  chore(crwa): Fix/format code comment
@dac09 dac09 enabled auto-merge (squash) January 22, 2024 14:51
@dac09 dac09 merged commit fca8d7a into main Jan 22, 2024
38 checks passed
@dac09 dac09 deleted the feat/describe-scenario branch January 22, 2024 15:08
@jtoar jtoar modified the milestones: next-release, v7.0.0 Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:feature This PR introduces a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants