Skip to content

Commit

Permalink
Simplify api response info for FF tests (#1664)
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Ohlsen <[email protected]>
  • Loading branch information
ohltyler authored Dec 9, 2024
1 parent 0ae4c07 commit c835903
Showing 1 changed file with 4 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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');
}
);
});
Expand Down

0 comments on commit c835903

Please sign in to comment.