Skip to content

Commit

Permalink
Simplify api response info
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Ohlsen <[email protected]>
  • Loading branch information
ohltyler committed Dec 4, 2024
1 parent 0ae4c07 commit 1037a30
Showing 1 changed file with 4 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,19 +133,8 @@ describe('Creating Workflows Using Various Methods', () => {
.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')
Expand Down Expand Up @@ -183,15 +172,8 @@ describe('Creating Workflows Using Various Methods', () => {

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');
}
);
});
Expand Down

0 comments on commit 1037a30

Please sign in to comment.