Skip to content

Commit

Permalink
modify test
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 3d1f5a2 commit 0ee88af
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions test/functional/apps/visualize/_area_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,14 +521,17 @@ export default function ({ getService, getPageObjects }) {

it('should show error when calendar interval invalid', async () => {
await PageObjects.visEditor.setInterval('14d', { type: 'custom' });
const intervalErrorMessage = await find.byCssSelector(
const intervalErrorMessageOne = await find.byCssSelector(
'[data-test-subj="visEditorInterval"] + .euiFormErrorText'
);
const errorMessage = await intervalErrorMessage.getVisibleText();
expect(errorMessage).to.be('Invalid calendar interval: 2w, value must be 1');
//await PageObjects.visEditor.setInterval('3w', { type: 'custom' });
//errorMessage = await intervalErrorMessage.getVisibleText();
//expect(errorMessage).to.be('Invalid calendar interval: 3w, value must be 1');
const errorMessageOne = await intervalErrorMessageOne.getVisibleText();
expect(errorMessageOne).to.be('Invalid calendar interval: 2w, value must be 1');
await PageObjects.visEditor.setInterval('3w', { type: 'custom' });
const intervalErrorMessageSecond = await find.byCssSelector(
'[data-test-subj="visEditorInterval"] + .euiFormErrorText'
);
const errorMessageSecond = await intervalErrorMessageSecond.getVisibleText();
expect(errorMessageSecond).to.be('Invalid calendar interval: 3w, value must be 1');
});
});
});
Expand Down

0 comments on commit 0ee88af

Please sign in to comment.