[Test] Automate rename workspace test#23838
Conversation
|
@SkorikSergey, did you have a run |
| /** | ||
| * devSpaces Dashboard does not allow editing the workspace display name while the workspace is running. | ||
| */ | ||
| async waitRenameWorkspaceNotPossibleWhileWorkspaceRunning(): Promise<void> { |
There was a problem hiding this comment.
I would suggest making the method name more specific, like checkRenameButtonIsAbsent()
| /** | ||
| * rename a stopped workspace from the Overview tab (fill name + save). | ||
| */ | ||
| async renameStoppedWorkspaceTo(newDisplayName: string): Promise<void> { |
There was a problem hiding this comment.
The fact that workspace is stopped doesn't matter in context of Workspace Details page.
We are just trying to rename workspace, nothing else.
Let's name the method correspondingly, like renameWorkspace().
| await this.waitWorkspaceTitle(newDisplayName); | ||
| } | ||
|
|
||
| async attemptRenameWorkspaceName(desiredName: string): Promise<void> { |
There was a problem hiding this comment.
attemptRenameWorkspaceName() is really test-level assertion logic - it's verifying a negative scenario (save button disabled, then cancel). That kind of logic belongs in the spec file (RenameWorkspace test), not in the page object.
| await this.closeRenameWorkspaceForm(); | ||
| } | ||
|
|
||
| async closeRenameWorkspaceForm(): Promise<void> { |
There was a problem hiding this comment.
closeRenameWorkspaceForm() has the same problem - it's only ever called from attemptRenameWorkspaceName, which itself is test-specific logic.
If attemptRenameWorkspaceName moves to the RenameWorkspace test, closeRenameWorkspaceForm() has no reason to stay in the page object either.
Yes, I will update PR description with logs |
What does this PR do?
Automate “Rename Workspace” test
Test scenario:
Screenshot/screencast of this PR
What issues does this PR fix or reference?
https://redhat.atlassian.net/browse/CRW-10665
How to test this PR?
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.