[AAE-2107] Move e2e to Unit test (#5535)

* [AAE-2107] Move e2e to Unit test

* * fixed namings

* * more unit test added

* * minor changes
This commit is contained in:
Eugenio Romano
2020-03-05 16:47:59 +00:00
committed by GitHub
parent 0217f0c788
commit a70883378a
19 changed files with 809 additions and 772 deletions

View File

@@ -66,12 +66,14 @@ describe('CardViewKeyValuePairsItemComponent', () => {
component.property = new CardViewKeyValuePairsItemModel({
label: 'Key Value Pairs',
value: mockData,
key: 'key-value-pairs'
key: 'key-value-pairs',
editable: false
});
component.ngOnChanges();
fixture.detectChanges();
expect(component.isEditable()).toBe(false);
const table = fixture.debugElement.query(By.css('.adf-card-view__key-value-pairs__read-only'));
const form = fixture.debugElement.query(By.css('.adf-card-view__key-value-pairs'));
@@ -96,7 +98,6 @@ describe('CardViewKeyValuePairsItemComponent', () => {
const valueInput = fixture.debugElement.query(By.css(`[data-automation-id="card-${component.property.key}-value-input-0"]`));
expect(nameInput).not.toBeNull();
expect(valueInput).not.toBeNull();
});
it('should remove an item from list on REMOVE button click', () => {