Skip to content

Commit

Permalink
test(grid): Change variable name #8978
Browse files Browse the repository at this point in the history
  • Loading branch information
Volen99 committed Sep 20, 2021
1 parent 3224a72 commit 729a9a7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -487,9 +487,9 @@ const testMerging = () => {
describe('Test merging', () => {
it('Should merge add transactions correctly', () => {
const data = SampleTestData.personIDNameData();
const addRow4 = { ID: 4, IsDev: true, Name: 'Peter' };
const addRow5 = { ID: 5, IsDev: true, Name: 'Mimi' };
const addRow6 = { ID: 6, IsDev: false, Name: 'Pedro' };
const addRow4 = { ID: 4, IsEmployed: true, Name: 'Peter' };
const addRow5 = { ID: 5, IsEmployed: true, Name: 'Mimi' };
const addRow6 = { ID: 6, IsEmployed: false, Name: 'Pedro' };
const transactions: Transaction[] = [
{ id: addRow4.ID, newValue: addRow4, type: TransactionType.ADD },
{ id: addRow5.ID, newValue: addRow5, type: TransactionType.ADD },
Expand Down
6 changes: 3 additions & 3 deletions projects/igniteui-angular/src/lib/grids/grid/column.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ describe('IgxGrid - Column properties #grid', () => {
const cell = grid.getCellByColumn(i, 'ID');
expect(cell.nativeElement.textContent).toMatch(formatter(cell.value));

const cellBool = grid.gridAPI.get_cell_by_index(i, 'IsDev');
const cellBool = grid.gridAPI.get_cell_by_index(i, 'IsEmployed');
expect(cellBool.nativeElement.textContent).toMatch(boolFormatter(cellBool.value));
}
});
Expand Down Expand Up @@ -173,11 +173,11 @@ describe('IgxGrid - Column properties #grid', () => {
grid.moveColumn(grid.columnList.first, grid.columnList.last);
fix.detectChanges();

expect(grid.columnList.first.field).toMatch('IsDev');
expect(grid.columnList.first.field).toMatch('IsEmployed');
expect(grid.columnList.last.field).toMatch('ID');

headers = fix.debugElement.queryAll(By.css(COLUMN_HEADER_CLASS));
expect(headers[0].nativeElement.textContent).toMatch('IsDev');
expect(headers[0].nativeElement.textContent).toMatch('IsEmployed');
expect(headers[1].nativeElement.textContent).toMatch('Name');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ export class SampleTestData {

/* Data fields: ID: number, Name: string; 3 items. */
public static personIDNameData = () => ([
{ ID: 1, IsDev: true, Name: 'Johny' },
{ ID: 2, IsDev: true, Name: 'Sally' },
{ ID: 3, IsDev: false, Name: 'Tim' },
{ ID: 1, IsEmployed: true, Name: 'Johny' },
{ ID: 2, IsEmployed: true, Name: 'Sally' },
{ ID: 3, IsEmployed: false, Name: 'Tim' },
]);

/* Data fields: FirstName: string, LastName: string, age:number; 3 items. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export class ColumnDefinitions {

public static idNameFormatter = `
<igx-column field="ID" [formatter]="multiplier"></igx-column>
<igx-column field="IsDev" [dataType]="'boolean'"></igx-column>
<igx-column field="IsEmployed" [dataType]="'boolean'"></igx-column>
<igx-column field="Name"></igx-column>
`;

Expand Down

0 comments on commit 729a9a7

Please sign in to comment.