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

Make sure a custom blueprint will be used if it's not the default blueprint #1084

Merged
merged 48 commits into from
Mar 11, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
c13b9df
fix: ensure specified blueprint is installed
Dec 14, 2020
bb3ad41
test: fix test for install module changes
Dec 17, 2020
f32dd04
feat: support using yarn to install
Dec 22, 2020
b526d57
test: modify "can install an addon with a default bluepr..."
Dec 22, 2020
a74e0f6
fix: expand -D to --save-dev
Dec 22, 2020
cdb7e43
docs: update readme with mroe context and information on what's possible
Dec 22, 2020
6982022
docs: add back ember init comparison documentation
Dec 22, 2020
c12ad89
fix: replace run with spawn
Jan 5, 2021
d005d74
fix: pass correct params to spawn command for modifications
Jan 5, 2021
5276c1f
fix(install-and-generate-blueprint): pass correct param format for bi…
Jan 5, 2021
e64dcf3
Update README.md
gitstevenpham Jan 8, 2021
1bd50c0
docs: remove duplicated information about why its difference than emb…
Jan 8, 2021
8579ff6
fix: ensure default blueprints work for on disk blueprints
Jan 20, 2021
853dce5
fix: move hasYarn to its own module
Feb 11, 2021
604e9d3
fix: revert --blueprint change in ember-cli-update-test
Feb 11, 2021
79b57fb
test: add unit test for has-yarn
Feb 11, 2021
a337471
test: fix hasYarn test
Feb 11, 2021
59623c2
test: added unit tests for functions in install-and-generate-blueprin…
Feb 12, 2021
b46ef80
test: add test case for blueprint options
Feb 12, 2021
39de14d
test: add integration test case for install for custom-blueprint
Feb 12, 2021
6c5d4d8
test: add test case for integration of index
Feb 12, 2021
680eb67
chore: fix lint issues
Feb 12, 2021
8ada4ab
fix: hashYarn -> hasYarn and getProjectOptions export
Feb 15, 2021
4c19207
fix: remove fixturify and follow creeateTempDir convention
Feb 15, 2021
3e3ad30
fix: use sinon to mock functions
Feb 15, 2021
c1da963
fix: eslint fix
Feb 15, 2021
8024efa
test: add test cause for index command with new functionality
Feb 16, 2021
63f1e9c
test: use sinon for second test case for install-and--generate-bluepr…
Feb 16, 2021
595ed07
test: check calls after main function call
Feb 16, 2021
e4801d1
fix: add back test assert accidentally deleted
Feb 16, 2021
86dafaf
fix: pr comments
Feb 25, 2021
da143ac
refactor: move blueprint override check into its own module
Feb 25, 2021
e23cd0b
merged to master
Feb 25, 2021
167fe54
fix: linting fixes
Feb 25, 2021
88fd6d2
test: correct typoo in test name
Feb 26, 2021
cea7011
remove mocking from test
Mar 3, 2021
fafe03a
fix: hasYarn function async
Mar 3, 2021
9633f7b
addressing more pr comments
Mar 3, 2021
66d6532
move custom blueprint test to its own describe
Mar 3, 2021
47426bd
test: add test case with install flow with default blueprint
Mar 4, 2021
292446d
remove sinon stubbing in acceptance
Mar 4, 2021
1ba496c
switch to use npm helper
Mar 4, 2021
3ced520
remove sinon from install-test integration
Mar 4, 2021
36920ec
use loadSafeBlueprintFile
Mar 4, 2021
bbb89ed
fix final destination blueprint read
Mar 4, 2021
00d6590
clean up get-default-blueprint-name-override
Mar 10, 2021
3ab613e
move 2 test cases for get-default-blueprint-name-override to integration
Mar 10, 2021
9c2b730
final cleanup
Mar 11, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions test/integration/install-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const {
} = require('../helpers/assertions');
const { initBlueprint } = require('../helpers/blueprint');
const loadSafeBlueprintFile = require('../../src/load-safe-blueprint-file');
const sinon = require('sinon');

describe(install, function() {
this.timeout(60e3);
Expand Down Expand Up @@ -70,12 +69,7 @@ describe(install, function() {
});
}

afterEach(function() {
sinon.restore();
});

it('can install an addon with a default blueprint and no state file', async function() {
sinon.stub(install, 'getBlueprintNameOverride').resolves();
let {
location
} = (await loadSafeBlueprintFile('test/fixtures/blueprint/addon/legacy-app/merge/my-app/config/ember-cli-update.json')).blueprints[1];
Expand Down Expand Up @@ -108,7 +102,6 @@ describe(install, function() {
});

it('can install an addon with a custom default blueprint selected', async function() {
sinon.stub(install, 'getBlueprintNameOverride').resolves();
let {
location
} = (await loadSafeBlueprintFile('test/fixtures/blueprint/addon/legacy-app/merge/my-app/config/ember-cli-update.json')).blueprints[1];
Expand Down
5 changes: 5 additions & 0 deletions test/unit/get-default-blueprint-name-override-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,9 @@ describe(getBlueprintNameOverride, function() {
let defaultBlueprintOverride = await getBlueprintNameOverride(localPackageFixture);
expect(defaultBlueprintOverride).to.be.equal('custom-blueprint');
});

it('NPM package with nondefault returns expected value', async function() {
Copy link
Member

Choose a reason for hiding this comment

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

nitpick but this test should be moved to a new file test/integration/get-default-blueprint-name-override-test.js

Copy link
Member

Choose a reason for hiding this comment

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

as well as the above one which is testing the disk blueprints

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

let defaultBlueprintOverride = await getBlueprintNameOverride('ember-cli-update-default-blueprint-override-test');
expect(defaultBlueprintOverride).to.be.equal('hello-world');
});
});