Created RestartFromLocalDevfile test - #23931
Conversation
Assisted-by: Claude Code Signed-off-by: Oleksii Korniienko <olkornii@redhat.com>
Signed-off-by: Oleksii Korniienko <olkornii@redhat.com>
Assisted-by: Claude Code Signed-off-by: Oleksii Korniienko <olkornii@redhat.com>
| await driverHelper.wait(1000); | ||
| } | ||
|
|
||
| // go to line 9999 to jump to the end of the file |
There was a problem hiding this comment.
The code could be simplified by changing the file content using the terminal:
// Append invalid env declaration directly to devfile.yaml
const appendOutput: ShellString = containerTerminal.execInContainerCommand(
`printf ' env:\\n - name: test-env\\n value: true\\n' >> /projects/${projectName}/devfile.yaml`
);
|
@olkornii : Thank you for the test automation. It looks good overall and covers the test scenarios as expected. There are a few cosmetic issues that violate CODE_STYLE.md and are worth improving:
CODE_STYLE.md says: "Use test ./constants to make test flexible." The PR uses raw numbers throughout:
Other specs (e.g. WorkspaceBackupRestore.spec.ts) call registerRunningWorkspace(WorkspaceHandlingTests.getWorkspaceName()) after creating a workspace so the global MochaHook afterAll can delete it on unexpected failures. The PR never calls this, relying solely on suiteTeardown. If the suite crashes before teardown, the workspace is leaked.
CODE_STYLE.md rule (for page-object classes): "✗ Avoid to declare locators as constant in methods." |
What does this PR do?
Automation for RestartFromLocalDevfile manual test case
Screenshot/screencast of this PR
What issues does this PR fix or reference?
https://redhat.atlassian.net/browse/CRW-11918
How to test this PR?
There is a related bug: https://redhat.atlassian.net/browse/CRW-9559
Once this bug is fixed it will be possible to run jenkins job.
PR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or referenceandHow to test this PRcompletedReviewers
Reviewers, please comment how you tested the PR when approving it.