Skip to content

Commit

Permalink
test: switch branch spec ce (#35312)
Browse files Browse the repository at this point in the history
Enabled Test
Replaced some validations with should with aghelper assertions

EE: appsmithorg/appsmith-ee#4755

/ok-to-test tags="@tag.Sanity"




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


- **Bug Fixes**
- Enhanced testing for Git synchronization by refining branch name
handling in input fields, leading to improved reliability.

- **Chores**
- Updated the Cypress limited tests to focus on the
`SwitchBranches_spec.js`, changing the test execution target.
	- Removed unnecessary wait command to streamline test execution.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10181073301>
> Commit: 41db4eb
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10181073301&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Wed, 31 Jul 2024 13:48:05 UTC
<!-- end of auto-generated comment: Cypress test results  -->
  • Loading branch information
NandanAnantharamu authored Aug 1, 2024
1 parent ccedf2e commit 9478bb5
Showing 1 changed file with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,20 @@ describe("Git sync:", { tags: ["@tag.Git"] }, function () {
cy.get(gitSyncLocators.branchSearchInput).type(
`{selectall}${hypenBranchName}`,
);
cy.get(gitSyncLocators.branchSearchInput).should(
"have.value",
agHelper.AssertAttribute(
gitSyncLocators.branchSearchInput,
"value",
"hypen-branch-name",
);

const specialBranchName = "special&branch-name~@#$%^&*()_+={}[]><,.";
cy.get(gitSyncLocators.branchSearchInput).type(
`{selectall}${specialBranchName}`,
);

cy.get(gitSyncLocators.branchSearchInput).should(
"have.value",
agHelper.AssertAttribute(
gitSyncLocators.branchSearchInput,
"value",
"special_branch-name_____________________",
);

cy.wait(200);
cy.get(gitSyncLocators.closeBranchList).click();
});

Expand Down Expand Up @@ -207,7 +205,6 @@ describe("Git sync:", { tags: ["@tag.Git"] }, function () {
cy.get(gitSyncLocators.branchListItem)
.contains(remoteTempBranchRenamedRegex)
.should("exist");

cy.get(gitSyncLocators.closeBranchList).click();
cy.switchGitBranch(`origin/${tempBranchRenamed}`);
cy.switchGitBranch(`origin/${tempBranchRenamed}`, true);
Expand Down

0 comments on commit 9478bb5

Please sign in to comment.