-
Notifications
You must be signed in to change notification settings - Fork 196
[full-ci][tests-only] test: convert admin-settings-spaces.feature to playwright #13488
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
base: master
Are you sure you want to change the base?
[full-ci][tests-only] test: convert admin-settings-spaces.feature to playwright #13488
Conversation
425b360 to
af00be4
Compare
2a23283 to
ddfbaff
Compare
17fc589 to
4af8285
Compare
4af8285 to
358c812
Compare
|
| names: string[] | ||
| ids: string[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| names: string[] | |
| ids: string[] | |
| projectSpaces: Array<{ name: string; id: string }> |
| names: ['team'], | ||
| ids: ['team.1'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| names: ['team'], | |
| ids: ['team.1'] | |
| projectSpaces: Array<{ name: string; id: string }> |
| spacesEnvironment, | ||
| stepUser: 'Admin', | ||
| id: 'team.b' | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| }) | |
| }) | |
| // And "Alice" logs out |
Was this step intentionally skipped, or was it missed by mistake?
| await ui.logInUser({ usersEnvironment, actorsEnvironment, stepUser: 'Alice' }) | ||
| await ui.openApplication({ actorsEnvironment, stepUser: 'Alice', name: 'admin-settings' }) | ||
| await ui.navigateToProjectSpaceManagementPage({ actorsEnvironment, stepUser: 'Alice' }) | ||
| await ui.updateSpaceUsingContextMenu({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| await ui.updateSpaceUsingContextMenu({ | |
| await ui.updateSpaceAttributeUsingContextMenu({ |
Maybe this
| key: string | ||
| attribute: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| key: string | |
| attribute: string | |
| key: changes|updates | |
| attribute: name|subtitle|quota |
| await ui.updateSpaceUsingContextMenu({ | ||
| actorsEnvironment, | ||
| stepUser: 'Alice', | ||
| key: 'team.b', | ||
| attribute: 'subtitle', | ||
| value: 'Developer team-subtitle' | ||
| }) | ||
| await ui.updateSpaceUsingContextMenu({ | ||
| actorsEnvironment, | ||
| stepUser: 'Alice', | ||
| key: 'team.b', | ||
| attribute: 'quota', | ||
| value: '50' | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| await ui.updateSpaceUsingContextMenu({ | |
| actorsEnvironment, | |
| stepUser: 'Alice', | |
| key: 'team.b', | |
| attribute: 'subtitle', | |
| value: 'Developer team-subtitle' | |
| }) | |
| await ui.updateSpaceUsingContextMenu({ | |
| actorsEnvironment, | |
| stepUser: 'Alice', | |
| key: 'team.b', | |
| attribute: 'quota', | |
| value: '50' | |
| }) | |
| await ui.updateSpaceUsingContextMenu({ | |
| actorsEnvironment, | |
| stepUser: 'Alice', | |
| key: 'team.a', | |
| attribute: 'subtitle', | |
| value: 'Developer team-subtitle' | |
| }) | |
| await ui.updateSpaceUsingContextMenu({ | |
| actorsEnvironment, | |
| stepUser: 'Alice', | |
| key: 'team.a', | |
| attribute: 'quota', | |
| value: '50' | |
| }) |
Plz check if it's right or not.
| expect( | ||
| await ui.shouldSeeSpaces({ | ||
| actorsEnvironment, | ||
| stepUser: 'Alice', | ||
| expectedSpaceIds: ['team.a', 'team.b'] | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| expect( | |
| await ui.shouldSeeSpaces({ | |
| actorsEnvironment, | |
| stepUser: 'Alice', | |
| expectedSpaceIds: ['team.a', 'team.b'] | |
| }) | |
| expect( | |
| await ui.userShouldSeeSpaces({ | |
| actorsEnvironment, | |
| stepUser: 'Alice', | |
| expectedSpaceIds: ['team.a'] | |
| }) |
Plz check this one also if it is right or not.
| } | ||
| } | ||
|
|
||
| export async function shouldSeeSpaces({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| export async function shouldSeeSpaces({ | |
| export async function userShouldSeeSpaces({ |
| expectedSpaceIds: ['team.b'] | ||
| }) | ||
| ).toBeFalsy() | ||
| await ui.logOutUser({ actorsEnvironment, stepUser: 'Brian' }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| await ui.logOutUser({ actorsEnvironment, stepUser: 'Brian' }) | |
| await ui.logOutUser({ actorsEnvironment, stepUser: 'Brian' }) | |
I think you have missed some steps
When "Brian" logs in
And "Brian" opens the "admin-settings" app
And "Brian" navigates to the project spaces management page
When "Brian" disables the space "team.b" using the context-menu
And "Brian" deletes the space "team.b" using the context-menu
Then "Brian" should not see the following spaces
| id |
| team.b |
```| stepUser: 'Admin', | ||
| spaceName: 'team A', | ||
| members: [ | ||
| { user: 'Brian', shareType: 'user', role: 'Can edit' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| { user: 'Brian', shareType: 'user', role: 'Can edit' }, | |
| { user: 'Brian', shareType: 'user', role: 'Can edit with versions and trashbin' }, |
| stepUser: 'Alice', | ||
| expectedMembers: [ | ||
| { user: 'Admin', role: 'Can manage' }, | ||
| { user: 'Brian', role: 'Can edit' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| { user: 'Brian', role: 'Can edit' }, | |
| { user: 'Brian', role: 'Can edit with versions and trashbin' }, |



Description
convert spaces.feature test to playwright test
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Open tasks: