-
Notifications
You must be signed in to change notification settings - Fork 168
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
[tests-only][full-ci] Get collaborator role using either button or span selector #7064
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -324,15 +324,20 @@ module.exports = { | |
* @param {string} collaborator | ||
*/ | ||
getDisplayedPermission: async function (collaborator) { | ||
await collaboratorDialog.expandShareRoleDropdown(collaborator) | ||
await this.selectRole('Custom permissions') | ||
// read the permissions from the checkboxes | ||
const currentSharePermissions = await this.getSharePermissions() | ||
|
||
// Hide role select dropdown | ||
this.moveToElement('@customPermissionsDrop', -9, 0) | ||
this.api.mouseButtonClick() | ||
this.waitForElementNotPresent('@customPermissionsDrop', 1000) | ||
let currentSharePermissions = {} | ||
try { | ||
await collaboratorDialog.expandShareRoleDropdown(collaborator) | ||
await this.selectRole('Custom permissions') | ||
// read the permissions from the checkboxes | ||
currentSharePermissions = await this.getSharePermissions() | ||
|
||
// Hide role select dropdown | ||
await this.moveToElement('@customPermissionsDrop', -9, 0) | ||
await this.api.mouseButtonClick() | ||
await this.waitForElementNotPresent('@customPermissionsDrop', 1000) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we need to get rid of the fix timeout, this is a main thing why tests are becoming flacky AND slow. We might waste time here or maybe tomorrow 1000 will not be enough. |
||
} catch (e) { | ||
console.info('Collaborator Role is not editable!') | ||
} | ||
Comment on lines
+327
to
+340
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since there is this #7063 issue on the web, I am less confident about this change. And we don't have a test to check that after resharing with read-only permission, the collaborator role is listed as plain text. Tests won't catch the bug (#7063) in the future if this gets implemented. Also, I am not sure whether the role should be listed as plain text or a drop-down after resharing with read-only permission. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be nice if we can work out why this different behavior happens! @saw-jan do you see the problem manually? (Is it possible to observe both behaviors when slowly using the web UI manually?) (I want to rule out the chance that there is some transient display of UI elements which the automated test sometimes "sees" but for real users maybe the correct UI elements end up being displayed after a "flicker" of the incorrect UI elements) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, the issue can be reproduced manually. Steps to reproduce are listed here #7063 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I actually don't like to have this kind of workarounds in the test. what to do with bugs discovered by e2e tests?
We might want to make an exception here, because its not a failing test but a flaky one, but then we have to make super-sure that the workaround will be taken out when the bug is fixed @kulmann what do you think? |
||
return currentSharePermissions | ||
}, | ||
/** | ||
|
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.
can we get away without that position arguments? I know that has been there before (and even adjusted in between from
-7
to-9
).We should get rid of it because
but it could be done in a separate PR