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
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: run test only if there is no premium license
  • Loading branch information
jaaydenh committed Dec 10, 2024
commit 6330959e4aff5b23463cf020b39faf20ee4f603e
4 changes: 4 additions & 0 deletions site/e2e/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ export function requiresLicense() {
test.skip(!license);
}

export function noPremiumLicense() {
test.skip(license.length > 0);
}

/**
* requireTerraformProvisioner by default is enabled.
*/
Expand Down
3 changes: 2 additions & 1 deletion site/e2e/tests/organizations/customRoles/customRoles.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
deleteOrganization,
setupApiCalls,
} from "../../../api";
import { requiresLicense } from "../../../helpers";
import { requiresLicense, noPremiumLicense } from "../../../helpers";
import { beforeCoderTest } from "../../../hooks";

test.describe("CustomRolesPage", () => {
Expand Down Expand Up @@ -188,6 +188,7 @@ test.describe("CustomRolesPage", () => {
});

test("custom roles disabled", async ({ page }) => {
noPremiumLicense();
await page.goto("/organizations/coder/roles");
await expect(page).toHaveURL("/organizations/coder/roles");

Expand Down
Loading