Skip to content

Commit

Permalink
enable more tests
Browse files Browse the repository at this point in the history
Signed-off-by: ananzh <[email protected]>
  • Loading branch information
ananzh committed Jun 27, 2023
1 parent eedef25 commit 98d56d1
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions test/functional/apps/visualize/_area_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand All @@ -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');
Expand Down

0 comments on commit 98d56d1

Please sign in to comment.