Skip to content

Conversation

@mattmacf98
Copy link
Member

Description

This PR adds e2e playwright tests for all of the test cases found in the go client. This approach will fail on breaking changes to presentation and also conveniently will throw errors if you break the actual go tests.

e.x.

 Error: Command failed: go test -run ^TestDrawFrameSystem$/DrawFrameSystem github.com/viam-labs/motion-tools/client/client -count=1

      45 |      const page = await createPage(browser)
      46 |
    > 47 |     const output = execSync('go test -run ^TestDrawFrameSystem$/DrawFrameSystem github.com/viam-labs/motion-tools/client/client -count=1', {
         |                    ^
      48 |         encoding: 'utf-8'
      49 |     });

Testing

Ran the e2e tests to generate the snapshot files

@changeset-bot
Copy link

changeset-bot bot commented Nov 19, 2025

⚠️ No Changeset found

Latest commit: b841aaf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mattmacf98 mattmacf98 requested a review from DTCurrie November 19, 2025 21:33
)

func TestDrawLines(t *testing.T) {
offset := r3.Vector{X: 0, Y: 5000, Z: 0}
Copy link
Member Author

Choose a reason for hiding this comment

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

I moved some of these objects so they are on screen for the snapshot

@codecov
Copy link

codecov bot commented Nov 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

},
])
const page = await context.newPage()
await page.waitForTimeout(5000)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why wait for timeout? Any way to instead make this event driven (flakiness concern)?

Copy link
Member Author

Choose a reason for hiding this comment

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

oh that is a copy paste leftover from the e2e with waiting for the robot configuration, I can remove for these ones

@mattmacf98
Copy link
Member Author

also removed nurbs e2e test because I just realized they are random so will be different each time

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.

3 participants