Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit113e428

Browse files
committed
add a quota test
1 parentf0bafe9 commit113e428

File tree

2 files changed

+36
-2
lines changed

2 files changed

+36
-2
lines changed

‎site/e2e/tests/organizationGroups.spec.ts

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import{expect,test}from"@playwright/test";
2-
import{createOrganization,createUser,setupApiCalls}from"../api";
2+
import{
3+
createGroup,
4+
createOrganization,
5+
createUser,
6+
setupApiCalls,
7+
}from"../api";
38
import{expectUrl}from"../expectUrl";
49
import{randomName,requiresLicense}from"../helpers";
510
import{beforeCoderTest}from"../hooks";
@@ -68,3 +73,31 @@ test("create group", async ({ page }) => {
6873
awaitexpectUrl(page).toHavePathName(`/organizations/${org.name}/groups`);
6974
awaitexpect(page).toHaveTitle(`Groups - Org${org.name} - Coder`);
7075
});
76+
77+
test("change quota settings",async({ page})=>{
78+
requiresLicense();
79+
80+
// Create a new organization and group
81+
constorg=awaitcreateOrganization();
82+
constgroup=awaitcreateGroup(org.id);
83+
84+
// Go to settings
85+
awaitpage.goto(`/organizations/${org.name}/groups/${group.name}`);
86+
awaitpage.getByRole("button",{name:"Settings"}).click();
87+
expectUrl(page).toHavePathName(
88+
`/organizations/${org.name}/groups/${group.name}/settings`,
89+
);
90+
91+
// Update Quota
92+
awaitpage.getByLabel("Quota Allowance").fill("100");
93+
awaitpage.getByRole("button",{name:"Submit"}).click();
94+
95+
// We should get sent back to the group page afterwards
96+
expectUrl(page).toHavePathName(
97+
`/organizations/${org.name}/groups/${group.name}`,
98+
);
99+
100+
// ...and that setting should persist if we go back
101+
awaitpage.getByRole("button",{name:"Settings"}).click();
102+
awaitexpect(page.getByLabel("Quota Allowance")).toHaveValue("100");
103+
});

‎site/src/pages/ManagementSettingsPage/GroupsPage/GroupPage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,10 @@ export const GroupPage: FC = () => {
111111
{canUpdateGroup&&(
112112
<Stackdirection="row"spacing={2}>
113113
<Button
114+
role="button"
115+
component={RouterLink}
114116
startIcon={<SettingsOutlined/>}
115117
to="settings"
116-
component={RouterLink}
117118
>
118119
Settings
119120
</Button>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp