Skip to content
This repository has been archived by the owner on Jul 23, 2019. It is now read-only.

Commit

Permalink
fix: revert name change and fix url param (#576)
Browse files Browse the repository at this point in the history
  • Loading branch information
edewit committed Mar 26, 2019
1 parent 191f99d commit f991f0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions projects/ngx-launcher/src/lib/model/projectile.model.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,12 @@ describe('State saving and restoring', () => {
class SharedStateProjectile<T> extends Projectile<T> {
protected searchParams() {
// tslint:disable-next-line:max-line-length
return new URLSearchParams('?selectedSection=&shared=%7B%22projectName%22%3A%22projectName%22%2C%22projectVersion%22%3A%22%22%2C%22groupId%22%3A%22%22%2C%22mavenArtifact%22%3A%22some-value%22%2C%22space%22%3A%22%22%2C%22targetEnvironment%22%3A%22%22%7D');
return new URLSearchParams('?selectedSection=&shared=%7B%22projectName%22%3A%22projectName%22%2C%22projectVersion%22%3A%22%22%2C%22groupId%22%3A%22%22%2C%22artifactId%22%3A%22some-value%22%2C%22space%22%3A%22%22%2C%22targetEnvironment%22%3A%22%22%7D');
}
}

const projectile = new SharedStateProjectile();
projectile.sharedState.state;
projectile.restore('shared', projectile.getSavedState('shared'));
expect(projectile.sharedState.state.projectName).toBe('projectName');
expect(projectile.sharedState.state.mavenArtifact).toBe('some-value');
});
Expand Down
5 changes: 3 additions & 2 deletions projects/ngx-launcher/src/lib/model/projectile.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ export class Projectile<T> {
{ name: 'projectName', value: 'projectName' },
{ name: 'projectVersion', value: 'projectVersion' },
{ name: 'groupId', value: 'groupId' },
{ name: 'mavenArtifact', value: 'mavenArtifact' },
{ name: 'spacePath', value: 'spacePath' },
{ name: 'artifactId', value: 'mavenArtifact' },
{ name: 'space', value: 'spacePath' },
{ name: 'targetEnvironment', value: 'targetEnvironment' }
]);
state.filters.map(f => _.set(state._state, f.value, _.get(dependencyCheck, f.name)));
this.setState('shared', state);
}
return state;
Expand Down

0 comments on commit f991f0d

Please sign in to comment.