-
Notifications
You must be signed in to change notification settings - Fork 160
refactor(tests): moving to vitest initial commit #16781
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
base: master
Are you sure you want to change the base?
Conversation
projects/igniteui-angular/directives/src/directives/form-control/form-control.directive.spec.ts
Fixed
Show fixed
Hide fixed
| BaseFormatter, | ||
| I18N_FORMATTER | ||
| } from 'igniteui-angular/core'; | ||
| import { IgxOverlayOutletDirective, IgxOverlayService, OverlayCancelableEventArgs, OverlayClosingEventArgs, OverlayEventArgs, OverlaySettings, WEEKDAYS, BaseFormatter, I18N_FORMATTER } from 'igniteui-angular/core'; |
|
@copilot , can you fix the lint errors? |
|
@ChronosSF I've opened a new pull request, #16782, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: ChronosSF <2188411+ChronosSF@users.noreply.github.com>
fix(lint): resolve parsing errors and style violations from vitest migration
|
@copilot , this pr is meant to replace the old karma runner with vitest using playwright for browser mode. The automatic migration provided through a schematic left some issues. Use the CI build to check for errors and fix them. |
|
@ChronosSF I've opened a new pull request, #16785, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: ChronosSF <2188411+ChronosSF@users.noreply.github.com>
Co-authored-by: ChronosSF <2188411+ChronosSF@users.noreply.github.com>
fix(schematics): exclude spec files from build compilation
|
@copliot, fix test run errors by adding necessary imports. |
| ]); | ||
| const mockNgControl = { | ||
| writeValue: vi.fn().mockName("NgControl.writeValue"), | ||
| onChange: vi.fn().mockName("NgControl.onChange"), |
| import { NoopAnimationsModule } from '@angular/platform-browser/animations'; | ||
| import { IgxIconComponent } from 'igniteui-angular/icon'; | ||
| import { wait } from '../../../test-utils/ui-interactions.spec'; | ||
| import { describe, it, test, expect, beforeEach, vi } from 'vitest'; |
| import { IgxScrollInertiaDirective } from './scroll_inertia.directive'; | ||
|
|
||
| import { wait } from '../../../../test-utils/ui-interactions.spec'; | ||
| import { describe, it, test, expect, beforeEach, afterEach, vi } from 'vitest'; |
| import { FilteringExpressionsTree, FilteringLogic, IFilteringExpressionsTree, IGroupingExpression, IgxStringFilteringOperand, IPagingState, ISortingExpression, SortingDirection } from 'igniteui-angular/core'; | ||
| import { IgxHierarchicalGridComponent, IgxRowIslandComponent } from 'igniteui-angular/grids/hierarchical-grid'; | ||
| import { IgxGridNavigationService } from './grid-navigation.service'; | ||
| import { describe, it, test, expect, beforeEach, vi } from 'vitest'; |
| import { IgxGridComponent } from './grid.component'; | ||
| import { GridSelectionFunctions, GridFunctions } from '../../../test-utils/grid-functions.spec'; | ||
| import { ColumnType, SortingDirection } from 'igniteui-angular/core'; | ||
| import { describe, it, test, expect, beforeEach, vi } from 'vitest'; |
projects/igniteui-angular/grids/grid/src/grid-collapsible-columns.spec.ts
Fixed
Show fixed
Hide fixed
|
@copilot , in the CI run there are tests that throw errors for various reasons. Fix them. |
|
@ChronosSF I've opened a new pull request, #16786, to work on those changes. Once the pull request is ready, I'll request review from you. |
- Add expect import to calendar-helper-utils.ts - Replace jasmine.getEnv() with vitest beforeEach/afterEach - Replace jasmine.createSpyObj with vi.fn() based mocks - Replace pending() with it.skip() - Fix expect() message syntax for vitest (message before assertion) - Remove deprecated exportExcel and exportCsv properties - Remove deprecated moveable property from column definitions - Fix mock emitter types to use any for compatibility Co-authored-by: ChronosSF <2188411+ChronosSF@users.noreply.github.com>
- Add GridPagingMode import and use GridPagingMode.Remote for RemotePagingComponent - Add GridSelectionMode import and use GridSelectionMode.none for MovableColumnsComponent - Add GridColumnDataType import and properly type columns in IgxGridAdvancedFilteringDynamicColumnsComponent Co-authored-by: ChronosSF <2188411+ChronosSF@users.noreply.github.com>
- Add isEditable, isHidden, isGroupable to MovableTemplatedColumnsComponent - Add paging property to MovableColumnsLargeComponent Co-authored-by: ChronosSF <2188411+ChronosSF@users.noreply.github.com>
fix(tests): Complete Vitest migration fixes for CI compilation errors
|
@copilot , in the spec files after migrating from jasmine to vitest there are a lot of instances where the message format for the asserts (expect clauses) is wrong and needs to be as a second argument to the expect call. Fix those. |
|
@ChronosSF I've opened a new pull request, #16787, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: ChronosSF <2188411+ChronosSF@users.noreply.github.com>
Co-authored-by: ChronosSF <2188411+ChronosSF@users.noreply.github.com>
fix(tests): migrate expect assertion messages to Vitest format
| import { IgxDropDownItemBaseDirective } from '../../../drop-down/src/drop-down/drop-down-item.base'; | ||
| import { UIInteractions, wait } from 'igniteui-angular/test-utils/ui-interactions.spec'; | ||
| import { IgxComboAPIService } from './combo.api'; | ||
| import { describe, it, expect, beforeEach, afterAll, vi } from 'vitest'; |
Closes #
Additional information (check all that apply):
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes (migrations guidelines)