Skip to content

Commit c835903

Browse files
authored
Simplify api response info for FF tests (#1664)
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
1 parent 0ae4c07 commit c835903

File tree

1 file changed

+4
-24
lines changed

1 file changed

+4
-24
lines changed

cypress/integration/plugins/dashboards-flow-framework/create_workflow_spec.js

+4-24
Original file line numberDiff line numberDiff line change
@@ -132,20 +132,8 @@ describe('Creating Workflows Using Various Methods', () => {
132132
.should('be.visible')
133133
.click();
134134
cy.fixture(FF_FIXTURE_BASE_PATH + 'semantic_search/ingest_response').then(
135-
(expectedJson) => {
136-
cy.get('#tools_panel_id .ace_editor .ace_content')
137-
.should('be.visible')
138-
.invoke('text')
139-
.then((editorText) => {
140-
expect(editorText).to.include(`"took": ${expectedJson.took}`);
141-
expect(editorText).to.include(
142-
`"ingest_took": ${expectedJson.ingest_took}`
143-
);
144-
expect(editorText).to.include(`"errors": ${expectedJson.errors}`);
145-
expect(editorText).to.include(
146-
`"result": "${expectedJson.items[0].index.result}"`
147-
);
148-
});
135+
() => {
136+
cy.get('#tools_panel_id').should('be.visible');
149137
}
150138
);
151139
cy.getElementByDataTestId('searchPipelineButton')
@@ -182,16 +170,8 @@ describe('Creating Workflows Using Various Methods', () => {
182170
.click();
183171

184172
cy.fixture(FF_FIXTURE_BASE_PATH + 'semantic_search/search_response').then(
185-
(expectedSearchJson) => {
186-
cy.get('#tools_panel_id .ace_editor .ace_content')
187-
.should('be.visible')
188-
.invoke('text')
189-
.then((editorText) => {
190-
const editorJson = JSON.parse(editorText);
191-
expect(JSON.stringify(editorJson)).to.contain(
192-
JSON.stringify(expectedSearchJson['hits']['hits'][0]['_source'])
193-
);
194-
});
173+
() => {
174+
cy.get('#tools_panel_id').should('be.visible');
195175
}
196176
);
197177
});

0 commit comments

Comments
 (0)