mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-5422] remove deprecated "async()" from unit tests (#7109)
* remove angualar async from content services * upgrade more tests * upgrade core tests * upgrade tests * fix deprecated constant * fix tests * fix after rebase
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { MatCheckbox, MatCheckboxChange } from '@angular/material/checkbox';
|
||||
import { setupTestBed } from '../../../testing/setup-test-bed';
|
||||
@@ -68,7 +68,7 @@ describe('CardViewBoolItemComponent', () => {
|
||||
expect(value).not.toBeNull();
|
||||
});
|
||||
|
||||
it('should NOT render the label and value if the property is NOT editable and doesn\'t have a proper boolean value set', () => {
|
||||
it('should NOT render the label and value if the property is NOT editable and has no proper boolean value set', () => {
|
||||
component.editable = true;
|
||||
component.property.value = undefined;
|
||||
component.property.editable = false;
|
||||
@@ -189,15 +189,16 @@ describe('CardViewBoolItemComponent', () => {
|
||||
expect(cardViewUpdateService.update).toHaveBeenCalledWith(property, true);
|
||||
});
|
||||
|
||||
it('should update the property value after a changed', async(() => {
|
||||
it('should update the property value after a changed', async () => {
|
||||
component.property.value = true;
|
||||
|
||||
component.changed(<MatCheckboxChange> { checked: false });
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
expect(component.property.value).toBe(false);
|
||||
});
|
||||
}));
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
expect(component.property.value).toBe(false);
|
||||
});
|
||||
|
||||
it('should trigger an update event on the CardViewUpdateService [integration]', (done) => {
|
||||
const cardViewUpdateService = TestBed.inject(CardViewUpdateService);
|
||||
|
Reference in New Issue
Block a user