-
Notifications
You must be signed in to change notification settings - Fork 391
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
test: Add permissions and roles e2e tests #4172
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Uffizzi Ephemeral Environment
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4172 +/- ##
========================================
Coverage 97.38% 97.39%
========================================
Files 1189 1190 +1
Lines 41420 41527 +107
========================================
+ Hits 40338 40445 +107
Misses 1082 1082 ☔ View full report in Codecov by Sentry. |
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.
That was a lot of code to review, @kyle-ssg. Overall things look good. I've included some comments but I'll leave the final call on them to your discretion. Also, it looks like CI is currently failing, but I'll leave that up to you to fix.
frontend/e2e/init.cafe.js
Outdated
// test('Segment-part-1', async () => { | ||
// await testSegment1() | ||
// await logout() | ||
// }) |
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.
Here and below, many tests are commented out. Why?
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.
Sorry this is an old pr that I'm still reviving, should have been marked as draft
frontend/e2e/init.cafe.js
Outdated
// | ||
// test('Environment-permission', async () => { | ||
// await environmentPermissionTest() | ||
// await logout() | ||
// }) |
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.
Another commented out test.
click, createEnvironment, | ||
log, |
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.
Shouldn't createEnvironment
be on its own line?
} from '../helpers.cafe'; | ||
import { | ||
PASSWORD, | ||
E2E_NON_ADMIN_USER_WITH_PROJECT_PERMISSIONS, E2E_NON_ADMIN_USER_WITH_ENV_PERMISSIONS |
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.
nit: Shouldn't E2E_NON_ADMIN_USER_WITH_ENV_PERMISSIONS
be on its own line?
}) | ||
}} | ||
} | ||
ds |
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.
I assume ds
is a custom prop? If so, a more descriptive name would be good.
<div> | ||
<IdentifierString | ||
value={ | ||
(identity && identity.identity.identifier) || id |
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.
Calling identity.identity
looks weird / wrong.
Thanks for submitting a PR! Please check the boxes below:
pre-commit
to check lintingdocs/
if required so people know about the feature!Changes
Add e2e test for permissions and roles.
Closes #3854
How did you test this code?
We needed the branch test: seed data for permission and roles e2e tests to test it