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

C3: Support for interactivity in e2e tests #3613

Merged
merged 7 commits into from
Jul 20, 2023
Merged

C3: Support for interactivity in e2e tests #3613

merged 7 commits into from
Jul 20, 2023

Conversation

jculvey
Copy link
Contributor

@jculvey jculvey commented Jul 14, 2023

Adds e2e coverage that exercises interactive flows by matching output from stdout and emulating users keystrokes. This is useful to catch issues that arise when input can be supplied via command line arguments or interactive prompts.

This also opens the way to test some of the frameworks we couldn't before since completing the process requires some amount of user input.

What this PR solves / how to test:

Associated docs issue(s)/PR(s):

  • [insert associated docs issue(s)/PR(s)]

Author has included the following, where applicable:

Reviewer is to perform the following, as applicable:

  • Checked for inclusion of relevant tests
  • Checked for inclusion of a relevant changeset
  • Checked for creation of associated docs updates
  • Manually pulled down the changes and spot-tested

@changeset-bot
Copy link

changeset-bot bot commented Jul 14, 2023

⚠️ No Changeset found

Latest commit: 890e51f

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

@github-actions
Copy link
Contributor

github-actions bot commented Jul 14, 2023

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5612799115/npm-package-wrangler-3613

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/3613/npm-package-wrangler-3613

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5612799115/npm-package-wrangler-3613 dev path/to/script.js
Additional artifacts:
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5612799115/npm-package-cloudflare-pages-shared-3613

Note that these links will no longer work once the GitHub Actions artifact expires.

@codecov
Copy link

codecov bot commented Jul 14, 2023

Codecov Report

Merging #3613 (b7f4160) into main (e72a579) will increase coverage by 0.04%.
The diff coverage is n/a.

❗ Current head b7f4160 differs from pull request most recent head 890e51f. Consider uploading reports for the commit 890e51f to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3613      +/-   ##
==========================================
+ Coverage   75.19%   75.24%   +0.04%     
==========================================
  Files         190      190              
  Lines       11161    11161              
  Branches     2944     2944              
==========================================
+ Hits         8393     8398       +5     
+ Misses       2768     2763       -5     

see 3 files with indirect coverage changes

Copy link
Member

@dario-piotrowicz dario-piotrowicz left a comment

Choose a reason for hiding this comment

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

looks good to me, I just left some minor comments/suggestions 😄

packages/create-cloudflare/e2e-tests/workers.test.ts Outdated Show resolved Hide resolved
packages/create-cloudflare/src/helpers/command.ts Outdated Show resolved Hide resolved
packages/create-cloudflare/e2e-tests/helpers.ts Outdated Show resolved Hide resolved
@jculvey jculvey requested review from a team as code owners July 20, 2023 15:15
@jculvey jculvey merged commit 70a54e9 into main Jul 20, 2023
11 checks passed
@jculvey jculvey deleted the c3-interactive-e2e branch July 20, 2023 15:23
lrapoport-cf pushed a commit that referenced this pull request Aug 11, 2023
* C3: Add e2e tests that exercise interactive flows

* C3: Adding e2e tests for previously skipped frameworks

* Fixing unit tests

* C3: fixing e2e test run

* C3: Refactoring tmp folder creation in c3 e2e tests
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