chore: Add changes for new API contracts in GitSync.ts (#41101)
## Description EE Counterpart: https://github.com/appsmithorg/appsmith-ee/pull/7963 Fixes #`Issue Number` _or_ Fixes `Issue URL` > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="@tag.Git" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/16177814474> > Commit: fddb1629889967638a5675cb6f005b08c113f770 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=16177814474&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Git` > Spec: > <hr>Wed, 09 Jul 2025 19:50:34 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added support for using updated API endpoints during Git connection setup in tests via an optional parameter. * **Tests** * Enhanced test setup flexibility by allowing selection between original and new API endpoints for Git-related operations. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
parent
d34336e578
commit
3981590006
|
|
@ -159,12 +159,26 @@ export class GitSync {
|
|||
repoName = "Repo",
|
||||
assertConnect = true,
|
||||
privateFlag = false,
|
||||
useNewAPI = false,
|
||||
) {
|
||||
this.agHelper.GenerateUUID();
|
||||
cy.get("@guid").then((uid) => {
|
||||
repoName += uid;
|
||||
this.CreateTestGiteaRepo(repoName, privateFlag);
|
||||
|
||||
if (useNewAPI) {
|
||||
cy.intercept("POST", "/api/v1/git/applications/*/ssh-keypair*").as(
|
||||
`generateKey-${repoName}`,
|
||||
);
|
||||
|
||||
cy.intercept("GET", "/api/v1/git/applications/*/protected-branches").as(
|
||||
`protected-${repoName}`,
|
||||
);
|
||||
|
||||
cy.intercept("GET", "/api/v1/git/applications/*/refs").as(
|
||||
`branches-${repoName}`,
|
||||
);
|
||||
} else {
|
||||
cy.intercept("POST", "/api/v1/applications/ssh-keypair/*").as(
|
||||
`generateKey-${repoName}`,
|
||||
);
|
||||
|
|
@ -176,6 +190,7 @@ export class GitSync {
|
|||
cy.intercept("GET", "/api/v1/git/branch/app/*").as(
|
||||
`branches-${repoName}`,
|
||||
);
|
||||
}
|
||||
|
||||
this.OpenConnectModal();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user