Skip to content

Commit c522ded

Browse files
committed
Change cypress tests
1 parent 472361d commit c522ded

3 files changed

Lines changed: 5 additions & 11 deletions

File tree

x-pack/plugins/siem/cypress/integration/cases_connectors.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { goToEditExternalConnection } from '../tasks/all_cases';
1111
import {
1212
addServiceNowConnector,
1313
openAddNewConnectorOption,
14-
saveChanges,
1514
selectLastConnectorCreated,
1615
} from '../tasks/configure_cases';
1716
import { loginAndWaitForPageWithoutDateRange } from '../tasks/login';
@@ -37,7 +36,6 @@ describe('Cases connectors', () => {
3736
cy.get(TOASTER).should('have.text', "Created 'New connector'");
3837

3938
selectLastConnectorCreated();
40-
saveChanges();
4139

4240
cy.wait('@saveConnector', { timeout: 10000 })
4341
.its('status')

x-pack/plugins/siem/cypress/screens/configure_cases.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
export const ADD_NEW_CONNECTOR_OPTION_LINK =
8-
'[data-test-subj="case-configure-add-connector-button"]';
7+
export const ADD_NEW_CONNECTOR_DROPDOWN_BUTTON =
8+
'[data-test-subj="dropdown-connector-add-connector"]';
99

1010
export const CONNECTOR = (id: string) => {
1111
return `[data-test-subj='dropdown-connector-${id}']`;

x-pack/plugins/siem/cypress/tasks/configure_cases.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
*/
66

77
import {
8-
ADD_NEW_CONNECTOR_OPTION_LINK,
8+
ADD_NEW_CONNECTOR_DROPDOWN_BUTTON,
99
CONNECTOR,
1010
CONNECTOR_NAME,
1111
CONNECTORS_DROPDOWN,
1212
PASSWORD,
1313
SAVE_BTN,
14-
SAVE_CHANGES_BTN,
1514
SERVICE_NOW_CONNECTOR_CARD,
1615
URL,
1716
USERNAME,
@@ -33,15 +32,12 @@ export const openAddNewConnectorOption = () => {
3332
cy.get(MAIN_PAGE).then($page => {
3433
if ($page.find(SERVICE_NOW_CONNECTOR_CARD).length !== 1) {
3534
cy.wait(1000);
36-
cy.get(ADD_NEW_CONNECTOR_OPTION_LINK).click({ force: true });
35+
cy.get(CONNECTORS_DROPDOWN).click({ force: true });
36+
cy.get(ADD_NEW_CONNECTOR_DROPDOWN_BUTTON).click();
3737
}
3838
});
3939
};
4040

41-
export const saveChanges = () => {
42-
cy.get(SAVE_CHANGES_BTN).click();
43-
};
44-
4541
export const selectLastConnectorCreated = () => {
4642
cy.get(CONNECTORS_DROPDOWN).click({ force: true });
4743
cy.get('@createConnector')

0 commit comments

Comments
 (0)