[ADF-4799][ADF-4801] Automation tests for CardView clear date field and selectbox None option (#4993)

* [ADF-4799] Automation for clear date button

* [ADF-4801] Automate test for selectbox None option
This commit is contained in:
Marouan Bentaleb
2019-08-19 21:50:33 +01:00
committed by Eugenio Romano
parent 329f8b21bf
commit 643510ed45
2 changed files with 65 additions and 0 deletions

View File

@@ -81,6 +81,15 @@ describe('CardView Component', () => {
await expect(await cardViewPageComponent.getOutputText(0))
.toBe('[CardView Select Item] - two');
});
it('[C312448] Should be able to enable None option', async () => {
await cardViewPageComponent.enableNoneOption();
await cardViewPageComponent.clickSelectBox();
await cardViewPageComponent.selectValueFromComboBox(0);
await expect(cardViewPageComponent.getOutputText(0))
.toBe('[CardView Select Item] - null');
});
});
describe('Text', () => {
@@ -261,6 +270,18 @@ describe('CardView Component', () => {
await expect(await metadataViewPage.getPropertyText('datetime', 'datetime')).toEqual('Dec 24, 1983, 10:00');
});
it('[C312447] Should be able to clear the date field', async () => {
await cardViewPageComponent.enableClearDate();
await cardViewPageComponent.clearDateField();
await expect(await cardViewPageComponent.getDateValue()).toBe('', 'Date field should be cleared');
await expect(cardViewPageComponent.getOutputText(0))
.toBe('[CardView Date Item] - null');
await cardViewPageComponent.clearDateTimeField();
await expect(await cardViewPageComponent.getDateTimeValue()).toBe('', 'DateTime field should be cleared');
await expect(cardViewPageComponent.getOutputText(1))
.toBe('[CardView Datetime Item] - null');
});
});
it('[C279936] Should not be possible edit any parameter when editable property is false', async () => {