PromucFlow_constructor/app/client/cypress/locators/gitSyncLocators.js
Rudraprasad Das ac1740aaa7
chore: git continuous delivery automation tests (#31131)
## Description
Adds automation tests for Git continuous delivery

#### PR fixes following issue(s)
Fixes #31130 

#### Type of change
- Chore (housekeeping or task changes that don't impact user perception)

## Testing
>
#### How Has This Been Tested?
> Please describe the tests that you ran to verify your changes. Also
list any relevant details for your test configuration.
> Delete anything that is not relevant
- [ ] Manual
- [ ] JUnit
- [ ] Jest
- [ ] Cypress
>
>
#### Test Plan
> Add Testsmith test cases links that relate to this PR
>
>
#### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
>
>
>
## Checklist:
#### Dev activity
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


#### QA activity:
- [ ] [Speedbreak
features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-)
have been covered
- [ ] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-)
- [ ] Test plan has been peer reviewed by project stakeholders and other
QA members
- [ ] Manually tested functionality on DP
- [ ] We had an implementation alignment call with stakeholders post QA
Round 2
- [ ] Cypress test cases have been added and approved by SDET/manual QA
- [ ] Added `Test Plan Approved` label after Cypress tests were reviewed
- [ ] Added `Test Plan Approved` label after JUnit tests were reviewed


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **Refactor**
    - Improved the GitSync functionality for better user experience.
- **New Features**
- Added the ability to dynamically set test identifiers for the Copy
button, enhancing testing capabilities.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-03-01 14:05:16 +05:30

65 lines
3.2 KiB
JavaScript

export default {
gitRepoInput: ".t--git-repo-input input",
generateDeployKeyBtn: "[data-testid=t--generate-deploy-ssh-key-button]",
connectSubmitBtn: ".t--connect-submit-btn",
createNewBranchButton: ".t--create-new-branch-button",
createNewBranchSubmitbutton: ".t--create-new-branch-submit-button",
branchButton: "[data-testid='t--branch-button-currentBranch']",
commitCommentInput: ".t--commit-comment-input textarea",
commitButton: ".t--commit-button",
pullButton: ".t--pull-button",
openRepoButton: ".t--open-repo-button",
gitConfigNameInput: ".t--git-config-name-input input",
gitConfigEmailInput: ".t--git-config-email-input input",
branchSearchInput:
".t--branch-search-input .ads-v2-input__input-section-input",
branchListItem: "[data-testid=t--branch-list-item]",
closeGitSyncModal: ".ads-v2-modal__content-header-close-button",
closeRevokeModal: ".t--close-disconnect-modal",
gitSyncModal: "[data-testid='t--git-sync-modal']",
bottomBarCommitButton: ".t--bottom-bar-commit",
bottomBarMergeButton: ".t--bottom-bar-merge",
bottomBarPullButton: ".t--bottom-bar-pull",
mergeBranchDropdownDestination: ".t--merge-branch-dropdown-destination",
mergeCTA: "[data-testid=t--git-merge-button]",
loaderQuickGitAction: ".t--loader-quick-git-action",
connetStatusbar: ".t--connect-statusbar",
useGlobalGitConfig: "[data-testid=t--use-global-config-checkbox]",
connectGitBottomBar: ".t--connect-git-bottom-bar",
disabledConnectGitBottomBar: ".t--disabled-connect-git-bottom-bar",
syncBranches: ".t--sync-branches",
closeBranchList: ".t--close-branch-list",
learnMoreDeployKey: "//span[text()='Learn more']",
learnMoreSshUrl: ".t--learn-more-ssh-url",
readDocument: ".t--read-document",
gitConnectErrorLearnMore:
".t--git-connection-error .t--notification-banner-learn-more",
deployPreview: ".t--git-deploy-preview",
mergeButton: "[data-testid=t--git-merge-button]",
disconnectIcon: ".t--git-disconnect-icon",
disconnectGitModal: "[data-testid='t--disconnect-git-modal']",
disconnectButton: ".t--git-revoke-button",
closeDisconnectModal: ".ads-v2-modal__content-header-close-button",
disconnectAppNameInput: ".t--git-app-name-input",
repoLimitExceededErrorModal: ".t--git-repo-limited-modal",
gitModalLink: ".ads-v2-link",
connectedApplication: ".t--connected-app-wrapper",
diconnectLink: ".t--disconnect-link",
disconnectLearnMoreLink: ".t--disconnect-learn-more",
learnMoreOnRepoLimitModal: ".t--learn-more-repo-limit-modal",
gitSyncModalDeployTab: "[data-testid=t--tab-DEPLOY]",
gitPullCount: ".t--bottom-bar-commit .count",
gitConnectionContainer: "[data-testid=t--git-connection-container]",
gitRemoteURLContainer: "[data-testid=t--remote-url-container]",
discardChanges: ".t--discard-button",
gitBranchContextMenu: ".git-branch-more-menu",
gitBranchDelete: ".t--branch-more-menu-delete",
SSHKeycontextmenu: ".git-sync-modal .ads-v2-button__content",
regenerateSSHKeyECDSA: ".t--regenerate-sshkey-ECDSA",
regenerateSSHKeyRSA: ".t--regenerate-sshkey-RSA",
confirmButton: "//span[text()='Yes']",
errorCallout: ".t--git-connection-error span",
mergeConflicts:
"//span[contains(text(), 'There are uncommitted changes present in your local branch master. Please commit them first and try again')]",
};