From 899240e3b4bad6bf272fd40a9600669cd86d3aa9 Mon Sep 17 00:00:00 2001 From: Tyler Ohlsen Date: Mon, 9 Dec 2024 08:45:56 -0800 Subject: [PATCH] Simplify api response info for FF tests (#1664) Signed-off-by: Tyler Ohlsen (cherry picked from commit c835903cb915eabd6d2f3c0a4d5111ebd307a97a) --- .../create_workflow_spec.js | 28 +++---------------- 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/cypress/integration/plugins/dashboards-flow-framework/create_workflow_spec.js b/cypress/integration/plugins/dashboards-flow-framework/create_workflow_spec.js index 27711c512..439673218 100644 --- a/cypress/integration/plugins/dashboards-flow-framework/create_workflow_spec.js +++ b/cypress/integration/plugins/dashboards-flow-framework/create_workflow_spec.js @@ -132,20 +132,8 @@ describe('Creating Workflows Using Various Methods', () => { .should('be.visible') .click(); cy.fixture(FF_FIXTURE_BASE_PATH + 'semantic_search/ingest_response').then( - (expectedJson) => { - cy.get('#tools_panel_id .ace_editor .ace_content') - .should('be.visible') - .invoke('text') - .then((editorText) => { - expect(editorText).to.include(`"took": ${expectedJson.took}`); - expect(editorText).to.include( - `"ingest_took": ${expectedJson.ingest_took}` - ); - expect(editorText).to.include(`"errors": ${expectedJson.errors}`); - expect(editorText).to.include( - `"result": "${expectedJson.items[0].index.result}"` - ); - }); + () => { + cy.get('#tools_panel_id').should('be.visible'); } ); cy.getElementByDataTestId('searchPipelineButton') @@ -182,16 +170,8 @@ describe('Creating Workflows Using Various Methods', () => { .click(); cy.fixture(FF_FIXTURE_BASE_PATH + 'semantic_search/search_response').then( - (expectedSearchJson) => { - cy.get('#tools_panel_id .ace_editor .ace_content') - .should('be.visible') - .invoke('text') - .then((editorText) => { - const editorJson = JSON.parse(editorText); - expect(JSON.stringify(editorJson)).to.contain( - JSON.stringify(expectedSearchJson['hits']['hits'][0]['_source']) - ); - }); + () => { + cy.get('#tools_panel_id').should('be.visible'); } ); });