mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[mgmt/scriptFields] use better assertions to help debug #32862
(cherry picked from commit bbe106aea1
)
This commit is contained in:
parent
737b544418
commit
3b8cca3350
1 changed files with 3 additions and 3 deletions
|
@ -46,17 +46,17 @@ export default function ({ getService, getPageObjects }) {
|
|||
|
||||
it('should display script error when script is invalid', async function () {
|
||||
const scriptResults = await PageObjects.settings.executeScriptedField(`doc['iHaveNoClosingTick].value`);
|
||||
expect(scriptResults.includes('search_phase_execution_exception')).to.be(true);
|
||||
expect(scriptResults).to.contain('search_phase_execution_exception');
|
||||
});
|
||||
|
||||
it('should display script results when script is valid', async function () {
|
||||
const scriptResults = await PageObjects.settings.executeScriptedField(`doc['bytes'].value * 2`);
|
||||
expect(scriptResults.replace(/\s/g, '').includes('"myScriptedField":[6196')).to.be(true);
|
||||
expect(scriptResults.replace(/\s/g, '')).to.contain('"myScriptedField":[6196');
|
||||
});
|
||||
|
||||
it('should display additional fields', async function () {
|
||||
const scriptResults = await PageObjects.settings.executeScriptedField(`doc['bytes'].value * 2`, ['bytes']);
|
||||
expect(scriptResults.replace(/\s/g, '').includes('"bytes":3098')).to.be(true);
|
||||
expect(scriptResults.replace(/\s/g, '')).to.contain('"bytes":3098');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue