Skip to content

feat: create e2e tests for organization custom roles page #15814

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

Merged
merged 10 commits into from
Dec 16, 2024

Conversation

jaaydenh
Copy link
Contributor

@jaaydenh jaaydenh commented Dec 10, 2024

Adds 5 premium tests and 1 non-premium test.

@jaaydenh jaaydenh self-assigned this Dec 10, 2024
@jaaydenh jaaydenh requested a review from aslilac December 11, 2024 11:36
@jaaydenh jaaydenh marked this pull request as ready for review December 11, 2024 11:37
Copy link
Member

@aslilac aslilac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was expecting assigning custom roles to be tested as part of this work, but we can do that in a separate PR if you'd like. It should basically be a copy+paste of the existing test for regular roles.

await deleteOrganization("testers");
});

test("create custom role with UI", async ({ page }) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not make this a helper and call it from the other test rather than using the api?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have actually been going the route of having 2 different types of tests, one that starts with a change using the api and then completing the test through the UI and then another that does the same thing through the UI. I think there is the potential catching edge cases through this way of testing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aslilac Looking around at many of the existing tests, I see this pattern when the same things to happen for many tests, for example creating a template, the API is used but then atleast one test would do the same thing through the UI if possible. I feel like this many be a bit more performant than going through the UI for every test. The except would be if there are many variations of path the user could take through the UI.

@jaaydenh jaaydenh merged commit 202f7f7 into main Dec 16, 2024
29 checks passed
@jaaydenh jaaydenh deleted the jaaydenh/custom-roles-e2e-tests branch December 16, 2024 15:42
@github-actions github-actions bot locked and limited conversation to collaborators Dec 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants