Skip to content

Commit

Permalink
Select sync mode dropdown with a data-testid
Browse files Browse the repository at this point in the history
  • Loading branch information
ambirdsall committed Aug 28, 2022
1 parent c007f86 commit 953cc4a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
12 changes: 7 additions & 5 deletions airbyte-webapp-e2e-tests/cypress/pages/replicationPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ const destinationNamespace = "div[data-testid='namespaceDefinition']";
const destinationNamespaceCustom = "div[data-testid='namespaceDefinition-customformat']";
const destinationNamespaceSource = "div[data-testid='namespaceDefinition-source']";
const destinationNamespaceCustomInput = "input[data-testid='input']";
const syncModeDropdown = "div.sc-lbxAil.hgSxej";
const syncModeFullAppendValue = "div.sc-ftvSup.sc-jDDxOa.sEMqZ.kVUvAu";
const syncModeDropdown = "div[data-testid='syncSettingsDropdown'] input";
const successResult = "span[data-id='success-result']";
const saveStreamChangesButton = "button[data-testid='resetModal-save']";
const connectionNameInput = "input[data-testid='connectionName']";
Expand Down Expand Up @@ -41,9 +40,12 @@ export const setupDestinationNamespaceSourceFormat = () => {
}

export const selectFullAppendSyncMode = () => {
cy.get(syncModeDropdown).click();
cy.get(syncModeFullAppendValue).click();
}
cy.get(syncModeDropdown).first().click({ force: true });

cy.get(`.react-select__menu`)
.contains("Append") // it would be nice to select for "Full refresh" is there too
.click();
};

export const checkSuccessResult = () => {
cy.get(successResult).should("exist");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ const SyncSettingsDropdown: React.FC<DropdownProps> = (props) => (
Option,
Control: DropdownControl,
}}
data-testid="syncSettingsDropdown"
$withBorder
/>
);
Expand Down

0 comments on commit 953cc4a

Please sign in to comment.