-
Notifications
You must be signed in to change notification settings - Fork 160
IgxStepperComponent implementaton #10061
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
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5776fa4
feat(stepper): add component styles
9c2d929
feat(stepper): add component implementation
715e060
feat(stepper): add component sample
e37a358
refactor(carousel): add migration for CarouselAnimationType
80de0e8
test(stepper): add component tests
e80d7af
Merge pull request #10289 from IgniteUI/bpachilova/stepper-tests
kacheshmarova File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
projects/igniteui-angular/migrations/update-13_0_0/changes/classes.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"$schema": "../../common/schema/class.schema.json", | ||
"changes": [{ | ||
"name": "CarouselAnimationType", | ||
"replaceWith": "HorizontalAnimationType" | ||
} | ||
] | ||
} |
70 changes: 70 additions & 0 deletions
70
projects/igniteui-angular/migrations/update-13_0_0/index.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import * as path from 'path'; | ||
|
||
import { EmptyTree } from '@angular-devkit/schematics'; | ||
import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; | ||
|
||
const version = '13.0.0'; | ||
|
||
describe(`Update to ${version}`, () => { | ||
let appTree: UnitTestTree; | ||
const schematicRunner = new SchematicTestRunner('ig-migrate', path.join(__dirname, '../migration-collection.json')); | ||
const configJson = { | ||
defaultProject: 'testProj', | ||
projects: { | ||
testProj: { | ||
sourceRoot: '/testSrc' | ||
} | ||
}, | ||
schematics: { | ||
'@schematics/angular:component': { | ||
prefix: 'appPrefix' | ||
} | ||
} | ||
}; | ||
|
||
const migrationName = 'migration-22'; | ||
|
||
beforeEach(() => { | ||
appTree = new UnitTestTree(new EmptyTree()); | ||
appTree.create('/angular.json', JSON.stringify(configJson)); | ||
}); | ||
|
||
it('should rename CarouselAnimationType to HorizontalAnimationType', async () => { | ||
appTree.create( | ||
'/testSrc/appPrefix/component/test.component.ts', | ||
`import { Component, ViewChild } from '@angular/core'; | ||
import { CarouselAnimationType } from 'igniteui-angular'; | ||
|
||
@Component({ | ||
selector: 'animationType', | ||
templateUrl: './test.component.html', | ||
styleUrls: ['./test.component.scss'] | ||
}) | ||
export class AnimationType { | ||
public animationType: CarouselAnimationType = CarouselAnimationType.slide; | ||
} | ||
`); | ||
const tree = await schematicRunner | ||
.runSchematicAsync(migrationName, {}, appTree) | ||
.toPromise(); | ||
|
||
const expectedContent = `import { Component, ViewChild } from '@angular/core'; | ||
import { HorizontalAnimationType } from 'igniteui-angular'; | ||
|
||
@Component({ | ||
selector: 'animationType', | ||
templateUrl: './test.component.html', | ||
styleUrls: ['./test.component.scss'] | ||
}) | ||
export class AnimationType { | ||
public animationType: HorizontalAnimationType = HorizontalAnimationType.slide; | ||
} | ||
`; | ||
|
||
expect( | ||
tree.readContent( | ||
'/testSrc/appPrefix/component/test.component.ts' | ||
) | ||
).toEqual(expectedContent); | ||
}); | ||
}); |
11 changes: 11 additions & 0 deletions
11
projects/igniteui-angular/migrations/update-13_0_0/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics'; | ||
import { UpdateChanges } from '../common/UpdateChanges'; | ||
|
||
const version = '13.0.0'; | ||
|
||
export default (): Rule => (host: Tree, context: SchematicContext) => { | ||
context.logger.info(`Applying migration for Ignite UI for Angular to version ${version}`); | ||
|
||
const update = new UpdateChanges(__dirname, host, context); | ||
update.applyChanges(); | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.