Skip to content

Commit

Permalink
make selections
Browse files Browse the repository at this point in the history
  • Loading branch information
stephmilovic authored and MadameSheema committed Nov 28, 2020
1 parent 8668c64 commit 9ff9fb7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ export const SELECT_SN = `[data-test-subj="dropdown-connector-${connectorIds.sn}

export const SELECT_ISSUE_TYPE = `[data-test-subj="issueTypeSelect"]`;
export const SELECT_PRIORITY = `[data-test-subj="prioritySelect"]`;
export const SELECT_INCIDENT_TYPE = `[data-test-subj="incidentTypeComboBox"]`;
export const SELECT_INCIDENT_TYPE = `[data-test-subj="incidentTypeComboBox"] input[data-test-subj="comboBoxSearchInput"]`;
export const CONNECTOR_RESILIENT = `[data-test-subj="connector-settings-resilient"]`;
export const SELECT_SEVERITY = `[data-test-subj="severitySelect"]`;

export const SELECT_URGENCY = `[data-test-subj="urgencySelect"]`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { TestCase } from '../objects/case';
import { executeResponses, TestCase } from '../objects/case';

import {
BACK_TO_CASES_BTN,
Expand All @@ -17,6 +17,7 @@ import {
TITLE_INPUT,
} from '../screens/create_new_case';
import {
CONNECTOR_RESILIENT,
CONNECTOR_SELECTOR,
SELECT_IMPACT,
SELECT_INCIDENT_TYPE,
Expand Down Expand Up @@ -70,16 +71,30 @@ export const createNewCaseWithConnector = (newCase: TestCase) => {
cy.get(CONNECTOR_SELECTOR).click({ force: true });
cy.get(SELECT_JIRA).click({ force: true });
cy.get(SELECT_ISSUE_TYPE).should('exist');

cy.get(SELECT_PRIORITY).should('exist');
cy.get(SELECT_ISSUE_TYPE).select('10006');
cy.get(SELECT_PRIORITY).select('High');
cy.get(CONNECTOR_SELECTOR).click({ force: true });
cy.get(SELECT_SN).click({ force: true });
cy.get(SELECT_SEVERITY).should('exist');
cy.get(SELECT_URGENCY).should('exist');
cy.get(SELECT_IMPACT).should('exist');
cy.get(SELECT_URGENCY).select('2');
cy.get(SELECT_SEVERITY).select('1');
cy.get(SELECT_IMPACT).select('3');
cy.get(CONNECTOR_SELECTOR).click({ force: true });
cy.get(SELECT_RESILIENT).click({ force: true });
cy.get(SELECT_INCIDENT_TYPE).should('exist');
cy.get(SELECT_SEVERITY).should('exist');
cy.get(
SELECT_INCIDENT_TYPE
).type(`${executeResponses.resilient.incidentTypes.data[0].name}{enter}`, { force: true });
cy.get(
SELECT_INCIDENT_TYPE
).type(`${executeResponses.resilient.incidentTypes.data[1].name}{enter}`, { force: true });
cy.get(CONNECTOR_RESILIENT).click();
cy.get(SELECT_SEVERITY).select('5');
cy.get(SUBMIT_BTN).click({ force: true });
cy.get(LOADING_SPINNER).should('exist');
cy.get(LOADING_SPINNER).should('not.exist');
Expand Down

0 comments on commit 9ff9fb7

Please sign in to comment.