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

[bug]: Fix (remove) OOTB tests from scaffold #2321

Merged
merged 3 commits into from
Apr 9, 2020

Conversation

sirugh
Copy link
Contributor

@sirugh sirugh commented Apr 7, 2020

Description

The out of the box tests were failing to run. The tests that were copied were really internal tests for venia-concept components and were not intended to be scaffolded. There will be a follow-up ticket to add a proper test suite to the scaffolded app.

Related Issue

Closes PWA-476 and closes #2244.

Acceptance

Verification Stakeholders

@luke-denton-aligent @zetlen

Specification

Verification Steps

  1. Check out this PR locally.
  2. In a sibling directory from where you checked out pwa-studio, run the following command to mimic a scaffold:
../pwa-studio/packages/pwa-buildpack/bin/buildpack create-project . --template "venia-concept" --name "example" --author "example <[email protected]>" --backend-url "https://master-7rqtwti-mfwmkrjfqvbjk.us-4.magentosite.cloud/" --braintree-token "sandbox_8yrzsvtm_s2bg8fs563crhqzk" --npm-client "yarn"
  1. Once the command completes (it may throw an error, but thats ok) your directory should have the scaffolded app but there should be no tests copied from venia-concept and there should be no test script in the scaffolded package.json. As a bonus I also removed the _buildpack directory.

Screenshots / Screen Captures (if appropriate)

Image from Gyazo

Checklist

  • I have updated the documentation accordingly, if necessary.
  • I have added tests to cover my changes, if necessary.

@@ -105,7 +104,8 @@ function createProjectFromVenia({ fs, tasks, options }) {
delete config.projects.venia;
fs.outputJsonSync(targetPath, config, { spaces: 2 });
},
'{CHANGELOG*,LICENSE*,_buildpack/*}': tasks.IGNORE,
'{CHANGELOG*,LICENSE*,_buildpack,_buildpack/**,**/__tests__,**/__tests__/**}':
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This seems verbose because it is. We need to tell the matcher to ignore contents AND the top-level directory otherwise we end up with a bunch of empty __tests__ folders :)

@PWAStudioBot
Copy link
Contributor

PWAStudioBot commented Apr 7, 2020

Messages
📖

Access a deployed version of this PR here. Make sure to wait for the "pwa-pull-request-deploy" job to complete.

📖 DangerCI Failures related to missing labels/description/linked issues/etc will persist until the next push or next nightly build run (assuming they are fixed).

Generated by 🚫 dangerJS against c7faebe

Copy link
Contributor

@tjwiebell tjwiebell left a comment

Choose a reason for hiding this comment

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

Tiny suggestion to improve readability, but looks good 👍

packages/venia-concept/_buildpack/create.js Outdated Show resolved Hide resolved
@tjwiebell tjwiebell added the version: Patch This changeset includes backwards compatible bug fixes. label Apr 8, 2020
@dpatil-magento dpatil-magento merged commit 97fd955 into release/6.0 Apr 9, 2020
@dpatil-magento dpatil-magento deleted the rugh/pwa-476-no-tests-create-pwa branch April 9, 2020 17:31
dpatil-magento added a commit that referenced this pull request Apr 28, 2020
* Removed cart and checkout routes from 6.0 branch. (#2255)

* - Mock version in test so snaps dont fail during releases (#2266)

- Fixup regex to handle line breaks

* [security] minimist >= 1.2.2 (#2267)

* Requires at least minimist 1.2.2 due to security vuln

Signed-off-by: sirugh <[email protected]>

* Switches to yarn and requires minimist 1.2.2 for security vuln

Signed-off-by: sirugh <[email protected]>

* v6.0.0-alpha.1

* v6.0.0-beta.1

* Jimothy/6.0 release notes (#2279)

* Add unsorted PR list

* Add items to separate lists

* Finish organizing PRs in sections

* Finish highlights

* Remove entries that were part of previous releases

* Update PageBuilder to Page Builder

Co-authored-by: Devagouda <[email protected]>

* fix(pagebuilder): Html content type unescapes content when GraphQL does not (#2283)

Co-authored-by: Devagouda <[email protected]>

* [PWA-479] Extension Files Missing From Packages (#2305)

* Add extensible files and directories to published packages

* Revert version bumps

Co-authored-by: Devagouda <[email protected]>

* v6.0.0-beta.2

* [bug]: Fix (remove) OOTB tests from scaffold (#2321)

* Ignores buildpack and test directories during create-pwa

Signed-off-by: sirugh <[email protected]>

* Fix glob pattern to match sub directories AND contents

Signed-off-by: sirugh <[email protected]>

* Fixes tests and makes ignore pattern easier to construct

Signed-off-by: sirugh <[email protected]>

* [Doc] 6.0 release notes updates (#2323)

* Add new PRs to changelog and update compatibility table

* Fix wrong entry placement

* v6.0.0-beta.3

* v6.0.0-rc.1

* v6.0.0

* Enable cart and checkout routes

Co-authored-by: Revanth Kumar Annavarapu <[email protected]>
Co-authored-by: Tommy Wiebell <[email protected]>
Co-authored-by: Stephen <[email protected]>
Co-authored-by: devops-pwa-codebuild <[email protected]>
Co-authored-by: James Calcaben <[email protected]>
Co-authored-by: James Zetlen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:venia-concept version: Patch This changeset includes backwards compatible bug fixes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants