Skip to content

Conversation

FranjoMindek
Copy link
Contributor

@FranjoMindek FranjoMindek commented Sep 4, 2025

The goal of this PR is to refactor waspc/e2e-tests to make the whole project more understandable, easier to use and up to date with current Wasp project. This PR wont try to expand e2e-tests with additional tests.

How this is achieved:

  • Refactored the all mentions of "Golden tests" to "Snapshot tests", which is a much more known term for the type of testing we are doing here. It is also much more understandable for people without any prior terminology knowledge.
  • Changed waspComplex snapshot test with kitchen-sink snapshot tests. Instead of creating our own complex Wasp application for testing purposes, we use the existing kitchen-sink (old todoApp) Wasp app. (simplification)
  • Added e2e-tests/README.md
  • Improved "Snapshot Test"/"Golden Test" definition DX

Along the way we also expanded upon old logic to make it easier to reason when can specific shell commands be executed. Or more specifically in which context.

This is done by splitting the old ShellCommandContext into:

  • WaspAppContext
  • SnapshotTestContext

Where each context assumes in which environment their commands are run.
This change was also followed by project structure change, where context specific commands exist in their separate folders: ShellCommands.hs, SnapshotTest/ShellCommands.hs, WaspApp/ShellCommands.hs.

Part of: #1963

@FranjoMindek FranjoMindek self-assigned this Sep 5, 2025
@FranjoMindek FranjoMindek marked this pull request as ready for review September 5, 2025 11:06
Copy link
Member

@Martinsos Martinsos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice stuff, I like where this is going! Left some comments.

# Conflicts:
#	waspc/e2e-test/GoldenTests/WaspBuildGoldenTest.hs
#	waspc/e2e-test/GoldenTests/WaspCompileGoldenTest.hs
#	waspc/e2e-test/Tests/WaspBuildTest.hs
#	waspc/e2e-test/Tests/WaspCompileTest.hs
#	waspc/e2e-tests/Common.hs
#	waspc/e2e-tests/Tests/WaspBuildTest.hs
#	waspc/e2e-tests/Tests/WaspCompileTest.hs
#	waspc/e2e-tests/Tests/WaspComplexTest.hs
#	waspc/e2e-tests/Tests/WaspJobTest.hs
#	waspc/e2e-tests/Tests/WaspMigrateTest.hs
#	waspc/e2e-tests/Tests/WaspNewTest.hs
# Conflicts:
#	waspc/e2e-tests/test-outputs/waspComplexTest-golden/waspComplexTest/main.wasp
#	waspc/e2e-tests/test-outputs/waspJob-golden/waspJob/main.wasp
@FranjoMindek FranjoMindek merged commit 342f3a8 into main Oct 10, 2025
22 checks passed
@FranjoMindek FranjoMindek deleted the franjo/cli-testing branch October 10, 2025 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants