Skip to content

Commit

Permalink
fix name change bug and modify test to test behavior (#724)
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Ho <[email protected]>
  • Loading branch information
derek-ho authored Jul 20, 2023
1 parent 5c96cc6 commit f7efa56
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .cypress/integration/9_integrations.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,12 @@ describe('Tests the add nginx integration instance flow', () => {
cy.get('[data-test-subj="new-instance-name"]').should('have.value', 'nginx');
cy.get('[data-test-subj="createInstanceButton"]').should('be.disabled')
cy.get('[data-test-subj="addIntegrationFlyoutTitle"]').should('exist')
// Modifies the name of the integration
cy.get('[data-test-subj="new-instance-name"]').type(testInstance.substring(5));
// validates the created sample index
cy.get('[data-test-subj="data-source-name"]').type('ss4o_logs-nginx-sample-sample');
cy.get('[data-test-subj="validateIndex"]').click()
cy.get('[data-test-subj="new-instance-name"]').type(testInstance.substring(5));
cy.get('[data-test-subj="validateIndex"]').click();
cy.get('.euiToastHeader__title').should('contain', 'valid');
cy.get('[data-test-subj="createInstanceButton"]').click();
cy.get('.euiToastHeader__title').should('contain', 'successfully');
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export function AddIntegrationFlyout(props: IntegrationFlyoutProps) {
}
const [dataSourceMappings, integrationMappings] = await Promise.all([
fetchDataSourceMappings(targetDataSource),
fetchIntegrationMappings(name),
fetchIntegrationMappings(integrationName),
]);
if (!dataSourceMappings) {
validationErrors.push('Provided data stream could not be retrieved');
Expand Down

0 comments on commit f7efa56

Please sign in to comment.