Skip to content

Update e2e tests to support new configuration step order #3389

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

Merged
merged 1 commit into from
Aug 22, 2025

Conversation

Nateowami
Copy link
Collaborator

@Nateowami Nateowami commented Aug 21, 2025

This should have been updated in #3370, but was missed. Nothing is changed except the order of the steps.


This change is Reviewable

Copy link

codecov bot commented Aug 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.58%. Comparing base (46716f5) to head (b525f32).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3389   +/-   ##
=======================================
  Coverage   82.58%   82.58%           
=======================================
  Files         608      608           
  Lines       35958    35958           
  Branches     5864     5864           
=======================================
  Hits        29697    29697           
  Misses       5383     5383           
  Partials      878      878           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Nateowami Nateowami force-pushed the e2e/update-configure-sources-order branch 2 times, most recently from 1fd6dc5 to 7cb8181 Compare August 22, 2025 21:43
@Nateowami Nateowami requested a review from Copilot August 22, 2025 21:44
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates e2e tests to align with the new configuration step order that was introduced in PR #3370 but missed in the test files. The main change reorders the configuration steps in the draft generation workflow, moving reference project configuration before source project configuration.

  • Reordered configuration steps in e2e test workflows to match new UI flow
  • Commented out screenshot test code that was no longer needed
  • Added pull_request trigger to GitHub workflow for better test coverage

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
localized-screenshots.ts Reordered configuration steps and commented out login screenshot code
generate-draft.ts Updated step order with clear comments for reference projects, source project, and training data
e2e-tests.yml Added pull_request trigger to GitHub workflow

const originalViewportSize = await page.viewportSize();
await page.locator('[data-test-id="configure-button"]').click();

const originalViewportSize = await page.viewportSize()!;
Copy link
Preview

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

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

The non-null assertion operator (!) is unsafe here. The viewportSize() method can return null, and forcing it with ! could cause a runtime error. Use null checking instead: const originalViewportSize = await page.viewportSize(); if (!originalViewportSize) throw new Error('Viewport size not available');

Suggested change
const originalViewportSize = await page.viewportSize()!;
const originalViewportSize = await page.viewportSize();
if (!originalViewportSize) throw new Error('Viewport size not available');

Copilot uses AI. Check for mistakes.

@Nateowami Nateowami force-pushed the e2e/update-configure-sources-order branch from 7cb8181 to b525f32 Compare August 22, 2025 22:25
@Nateowami Nateowami enabled auto-merge (squash) August 22, 2025 22:25
@Nateowami Nateowami disabled auto-merge August 22, 2025 22:25
@RaymondLuong3 RaymondLuong3 self-assigned this Aug 22, 2025
Copy link
Collaborator

@RaymondLuong3 RaymondLuong3 left a comment

Choose a reason for hiding this comment

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

@RaymondLuong3 reviewed 2 of 3 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Nateowami)

@Nateowami Nateowami enabled auto-merge (squash) August 22, 2025 22:32
@Nateowami
Copy link
Collaborator Author

Thank you @RaymondLuong3! Getting these merged so they actually start passing is going to be really helpful.

@Nateowami Nateowami merged commit 531b87f into master Aug 22, 2025
15 of 16 checks passed
@Nateowami Nateowami deleted the e2e/update-configure-sources-order branch August 22, 2025 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants