diff --git a/test/functional/apps/visualize/_area_chart.js b/test/functional/apps/visualize/_area_chart.js index ca4419449a41..3905c3901d69 100644 --- a/test/functional/apps/visualize/_area_chart.js +++ b/test/functional/apps/visualize/_area_chart.js @@ -480,14 +480,14 @@ export default function ({ getService, getPageObjects }) { await PageObjects.visEditor.selectAggregation('Date Histogram'); }); - //it('should not show error message on init when the field is not selected', async () => { - // const fieldValues = await PageObjects.visEditor.getField(); - // expect(fieldValues[0]).to.be(undefined); - // const isFieldErrorMessageExists = await find.existsByCssSelector( - // '[data-test-subj="visDefaultEditorField"] + .euiFormErrorText' - // ); - // expect(isFieldErrorMessageExists).to.be(false); - //}); + it('should not show error message on init when the field is not selected', async () => { + const fieldValues = await PageObjects.visEditor.getField(); + expect(fieldValues[0]).to.be(undefined); + const isFieldErrorMessageExists = await find.existsByCssSelector( + '[data-test-subj="visDefaultEditorField"] + .euiFormErrorText' + ); + expect(isFieldErrorMessageExists).to.be(false); + }); describe('interval errors', () => { before(async () => { @@ -497,27 +497,27 @@ export default function ({ getService, getPageObjects }) { await testSubjects.scrollIntoView('advancedParams-2'); }); - //it('should not fail during changing interval when the field is not selected', async () => { - // await PageObjects.visEditor.setInterval('m'); - // const intervalValues = await PageObjects.visEditor.getInterval(); - // expect(intervalValues[0]).to.be('Millisecond'); - //}); - - //it('should not fail during changing custom interval when the field is not selected', async () => { - // await PageObjects.visEditor.setInterval('4d', { type: 'custom' }); - // const isInvalidIntervalExists = await find.existsByCssSelector( - // '.euiComboBox-isInvalid[data-test-subj="visEditorInterval"]' - // ); - // expect(isInvalidIntervalExists).to.be(false); - //}); - - //it('should show error when interval invalid', async () => { - // await PageObjects.visEditor.setInterval('xx', { type: 'custom' }); - // const isIntervalErrorMessageExists = await find.existsByCssSelector( - // '[data-test-subj="visEditorInterval"] + .euiFormErrorText' - // ); - // expect(isIntervalErrorMessageExists).to.be(true); - //}); + it('should not fail during changing interval when the field is not selected', async () => { + await PageObjects.visEditor.setInterval('m'); + const intervalValues = await PageObjects.visEditor.getInterval(); + expect(intervalValues[0]).to.be('Millisecond'); + }); + + it('should not fail during changing custom interval when the field is not selected', async () => { + await PageObjects.visEditor.setInterval('4d', { type: 'custom' }); + const isInvalidIntervalExists = await find.existsByCssSelector( + '.euiComboBox-isInvalid[data-test-subj="visEditorInterval"]' + ); + expect(isInvalidIntervalExists).to.be(false); + }); + + it('should show error when interval invalid', async () => { + await PageObjects.visEditor.setInterval('xx', { type: 'custom' }); + const isIntervalErrorMessageExists = await find.existsByCssSelector( + '[data-test-subj="visEditorInterval"] + .euiFormErrorText' + ); + expect(isIntervalErrorMessageExists).to.be(true); + }); it('should show error when calendar interval invalid', async () => { console.log('Test started');