Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement CheCode Editor POC test #21684

Merged

Conversation

ScrewTSW
Copy link
Member

@ScrewTSW ScrewTSW commented Sep 5, 2022

What does this PR do?

  • Prunes the existing codebase
  • Integrates vscode-extension-tester into the codebase
  • Adds a POC implementation for workspace readiness check in JavaSpringBoot devfile

Screenshot/screencast of this PR

What issues does this PR fix or reference?

https://issues.redhat.com/browse/CRW-3107
#21789

How to test this PR?

  • Set environment variables:
    • TS_SELENIUM_BASE_URL
    • TS_SELENIUM_USERNAME
    • TS_SELENIUM_OCP_USERNAME
    • TS_SELENIUM_PASSWORD
    • TS_SELENIUM_OCP_PASSWORD
    • TS_OCP_LOGIN_PROVIDER_TITLE
    • TS_SELENIUM_VALUE_OPENSHIFT_OAUTH="true"
  • Run initDefaultValues.sh
  • Execute tests npm run test-java-springboot

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.

@che-bot che-bot added kind/enhancement A feature request - must adhere to the feature request template. status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. target/branch Indicates that a PR will be merged into a branch other than master. labels Sep 5, 2022
@dmytro-ndp
Copy link
Contributor

@ScrewTSW : could you, please, write about how to run the test, and give an example of test run?

@ScrewTSW ScrewTSW force-pushed the CRW-3107-implement-CheCode-POC-test branch from 1ee769e to 2aa6d32 Compare September 13, 2022 14:42
@dmytro-ndp
Copy link
Contributor

@ScrewTSW : commented code could be removed having commit history.

It could also be useful to have list of tests which needs to be rewritten to be run in VS Code Editor, e.g. tests/e2e/tests/e2e/GitPublishBranch.spec.ts

try {
await driverHelper.getDriver().wait(until.elementLocated(By.className('monaco-workbench')));
} catch (err) {
if ((err as Error).name === 'WebDriverError') {
Copy link
Contributor

@dmytro-ndp dmytro-ndp Sep 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's interesting to know which kind of 'WebDriverError' is handled by 3 seconds wait.

Can it be handled by adding timeout to command in try {} block? :

await driverHelper.getDriver().wait(until.elementLocated(By.className('monaco-workbench')), 3000);

@ScrewTSW ScrewTSW force-pushed the CRW-3107-implement-CheCode-POC-test branch from 2aa6d32 to 9252481 Compare November 15, 2022 19:12
@ScrewTSW ScrewTSW changed the title Implement CheCode Editor POC test WIP: Implement CheCode Editor POC test Nov 15, 2022
@ScrewTSW ScrewTSW changed the base branch from checode-main to main November 15, 2022 19:15
@dmytro-ndp
Copy link
Contributor

dmytro-ndp commented Nov 15, 2022

@ScrewTSW: is there a draft of e2e/tests/e2e_happy_path/vscode/HappyPath.spec.ts ready to run?

@ScrewTSW
Copy link
Member Author

@ScrewTSW: is there a draft of e2e/tests/e2e_happy_path/vscode/HappyPath.spec.ts ready to run?

No, not yet. This is just POC refactor, so that it's ready for additional implementations

@dmytro-ndp
Copy link
Contributor

dmytro-ndp commented Nov 15, 2022

I see.

Actually, what has already been done looks commonly good.
Waiting on final result.

@ScrewTSW ScrewTSW force-pushed the CRW-3107-implement-CheCode-POC-test branch 3 times, most recently from 77f0828 to 70b84e1 Compare November 21, 2022 15:25
@dmytro-ndp
Copy link
Contributor

dmytro-ndp commented Nov 22, 2022

wkspc abbreviation in filenames tests/e2e/mocha-wkspc-creation-and-ls-theia.json looks strange

If it's shot name for workspace, then there is wide spread abbreviation existed: ws.

test('Register running workspace', async () => {
CheReporter.registerRunningWorkspace(WorkspaceHandlingTests.getWorkspaceName());
});
test('Wait workspace readiness', async() => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the criteria of workspace readiness?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The objects are present ant accessible. It's just a POC

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to express it in the test log, to understand which UI elements are expected to appear to say "Workspace is ready".

@ScrewTSW ScrewTSW force-pushed the CRW-3107-implement-CheCode-POC-test branch from 70b84e1 to eec3855 Compare November 23, 2022 13:31
Copy link
Contributor

@dmytro-ndp dmytro-ndp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to merge.

@ScrewTSW ScrewTSW force-pushed the CRW-3107-implement-CheCode-POC-test branch from eec3855 to d730113 Compare November 25, 2022 11:01
@ScrewTSW ScrewTSW changed the title WIP: Implement CheCode Editor POC test Implement CheCode Editor POC test Nov 28, 2022
@ScrewTSW ScrewTSW mentioned this pull request Nov 28, 2022
9 tasks
@ScrewTSW ScrewTSW force-pushed the CRW-3107-implement-CheCode-POC-test branch from e11fca5 to e91d4c3 Compare November 29, 2022 10:32
@ScrewTSW ScrewTSW merged commit cefb185 into eclipse-che:main Nov 29, 2022
@che-bot che-bot removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Nov 29, 2022
@che-bot che-bot added this to the 7.58 milestone Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template. target/branch Indicates that a PR will be merged into a branch other than master.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants