che icon indicating copy to clipboard operation
che copied to clipboard

Automate "SSH key with passphrase configuration from the User Dashboard" test-case

Open SkorikSergey opened this issue 2 months ago • 2 comments

What does this PR do?

Automate "SSH key with passphrase configuration from the User Dashboard" test-case

Screenshot/screencast of this PR

What issues does this PR fix or reference?

https://issues.redhat.com/browse/CRW-5392

How to test this PR?

To test this PR:

  • set TS_SELENIUM_SSH_PRIVATE_KEY and TS_SELENIUM_SSH_PUBLIC_KEY
  • also passphrase by TS_SELENIUM_SSH_PASSPHRASE
  • set TS_SELENIUM_FACTORY_GIT_REPO_URL for repo url
  • start SshUrlNoOauthPatFactory e2e test

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

SkorikSergey avatar Nov 07 '25 13:11 SkorikSergey

@SkorikSergey: thank you for test automation!

It's also important to ensure in the test that push inside the workspace without personal access token using either terminal or source control view works without asking for the passphrase. There was a problem with it in the past: https://github.com/eclipse-che/che-dashboard/pull/1157#issuecomment-2271110628

See an example of push verification in the test https://github.com/eclipse-che/che/blob/main/tests/e2e/specs/factory/NoSetupRepoFactory.spec.ts#L192-L251

dmytro-ndp avatar Nov 07 '25 15:11 dmytro-ndp

@SkorikSergey: thank you for pointing out the fact that SshUrlNoOauthPatFactory will fail if adding https://github.com/eclipse-che/che/blob/main/tests/e2e/specs/factory/NoSetupRepoFactory.spec.ts#L140-L154 steps into it without adding Data.txt file to the test repo:

  • https://gh.crw-qe.com/test-automation-only/quarkus-api-example.git
  • bitbucket-ssh.apps.ds-airgap2-v15.crw-qe.com/~admin/private-bb-repo.git

Please add Data.txt file to those repos as well.

dmytro-ndp avatar Nov 11 '25 15:11 dmytro-ndp

@SkorikSergey : thank you for the test improvement! The changes commonly look good. Do you have new test results to review?

dmytro-ndp avatar Dec 10 '25 14:12 dmytro-ndp

The code looks good. Yes, interesting to see results of run the test with the last changes.

artaleks9 avatar Dec 10 '25 15:12 artaleks9

@SkorikSergey : thank you for the test improvement! The changes commonly look good. Do you have new test results to review?

Added 3 text files with test result. Two for github repository and bitbucket(default for this test).

SkorikSergey avatar Dec 10 '25 16:12 SkorikSergey

@SkorikSergey : thank you for sharing the test run logs.

I found a commit message mismatch in the logs and repo. In repo there is no "Commit" prefix in the commit message, while ssh_with_passphrase.txt log contains it:

▼ SourceControlView.typeCommitMessage - Type commit text: "Commit 1765382240250"

Could you please take a look?

dmytro-ndp avatar Dec 10 '25 16:12 dmytro-ndp

@SkorikSergey : thank you for sharing the test run logs.

I found a commit message mismatch in the logs and repo. In repo there is no "Commit" prefix in the commit message, while ssh_with_passphrase.txt log contains it:

▼ SourceControlView.typeCommitMessage - Type commit text: "Commit 1765382240250"

Could you please take a look?

Thank you for attention. Commit prefix really not exist in commit message in this test and NoSetupRepoFactory for which I copy-pasted :). I will add prefix to message.

SkorikSergey avatar Dec 10 '25 17:12 SkorikSergey