Skip to content

Commit

Permalink
Refactor and move field mapping to first the page of create detector …
Browse files Browse the repository at this point in the history
…feature (opensearch-project#501)

* [FEATURE] Create detector \ Refactor and move field mapping to first the page of create detector feature opensearch-project#495

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>

* [FEATURE] Create detector \ Refactor and move field mapping to first the page of create detector feature opensearch-project#495

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>

* [FEATURE] Create detector \ Refactor and move field mapping to first the page of create detector feature opensearch-project#495

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>

* [FEATURE] Create detector \ Refactor and move field mapping to first the page of create detector feature opensearch-project#495

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>

* [FEATURE] Create detector \ Refactor and move field mapping to first the page of create detector feature opensearch-project#495

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>

* [FEATURE] Create detector \ Refactor and move field mapping to first the page of create detector feature opensearch-project#495

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>

* [FEATURE] Create detector \ Refactor and move field mapping to first the page of create detector feature opensearch-project#495

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>

---------

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>
  • Loading branch information
jovancacvetkovic committed Apr 10, 2023
1 parent bb277ae commit 5425b9b
Show file tree
Hide file tree
Showing 19 changed files with 307 additions and 415 deletions.
21 changes: 7 additions & 14 deletions cypress/integration/1_detectors.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe('Detectors', () => {

cy.get('.euiCallOut')
.should('be.visible')
.contains('The selected log sources contain different types of logs');
.contains('The selected log sources contain different log types');
});

it('...can be created', () => {
Expand Down Expand Up @@ -140,12 +140,6 @@ describe('Detectors', () => {
});
});

// Click Next button to continue
cy.get('button').contains('Next').click({ force: true });

// Check that correct page now showing
cy.contains('Configure field mapping');

// Select appropriate names to map fields to
for (let field_name in testMappings.properties) {
const mappedTo = testMappings.properties[field_name].path;
Expand All @@ -155,8 +149,8 @@ describe('Detectors', () => {
});
}

// Continue to next page
cy.get('button').contains('Next').click({ force: true, timeout: 2000 });
// Click Next button to continue
cy.get('button').contains('Next').click({ force: true });

// Check that correct page now showing
cy.contains('Set up alerts');
Expand Down Expand Up @@ -245,11 +239,10 @@ describe('Detectors', () => {
.realType('Edited description');

// Change input source
cy.get(`[data-test-subj="define-detector-select-data-source"]`)
.find('input')
.ospClear()
.focus()
.realType(cypressIndexWindows);
cy.get('.euiBadge__iconButton > .euiIcon').click({ force: true });
cy.get(`[data-test-subj="define-detector-select-data-source"]`).type(
`${cypressIndexWindows}{enter}`
);

// Change detector scheduling
cy.get(`[data-test-subj="detector-schedule-number-select"]`).ospClear().focus().realType('10');
Expand Down
Loading

0 comments on commit 5425b9b

Please sign in to comment.