Compare commits
2 Commits
2080f812b4
...
db328c62dc
| Author | SHA1 | Date | |
|---|---|---|---|
| db328c62dc | |||
| 702b1376df |
@@ -520,7 +520,7 @@ function PlatformChecks({
|
|||||||
)}
|
)}
|
||||||
{rows.length ? (
|
{rows.length ? (
|
||||||
rows.map((check, i) => (
|
rows.map((check, i) => (
|
||||||
<div className="check-row" key={i}>
|
<div className="check-row platform-check-row" key={i}>
|
||||||
<span>{displayValue(check.name)}</span>
|
<span>{displayValue(check.name)}</span>
|
||||||
<span>
|
<span>
|
||||||
{displayValue(check.value)} / {displayValue(check.limit)}
|
{displayValue(check.value)} / {displayValue(check.limit)}
|
||||||
|
|||||||
@@ -1013,6 +1013,16 @@ export function AlphaPage({
|
|||||||
aria-label="Alpha 表格工具栏"
|
aria-label="Alpha 表格工具栏"
|
||||||
>
|
>
|
||||||
<div className="inline-actions alpha-view-tools">
|
<div className="inline-actions alpha-view-tools">
|
||||||
|
<Button
|
||||||
|
icon={<IconRefresh aria-hidden="true" />}
|
||||||
|
theme="borderless"
|
||||||
|
type="tertiary"
|
||||||
|
aria-label="刷新 Alpha 列表"
|
||||||
|
title="按当前条件刷新列表"
|
||||||
|
loading={loading}
|
||||||
|
disabled={loading}
|
||||||
|
onClick={refresh}
|
||||||
|
/>
|
||||||
<Popover
|
<Popover
|
||||||
trigger="custom"
|
trigger="custom"
|
||||||
position="bottomLeft"
|
position="bottomLeft"
|
||||||
|
|||||||
@@ -677,6 +677,14 @@ label:not(.semi-checkbox):not(.semi-radio) {
|
|||||||
.check-row > span:first-child {
|
.check-row > span:first-child {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
.platform-check-row {
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
.platform-check-row > span:first-child {
|
||||||
|
flex: 0 1 50%;
|
||||||
|
min-width: 0;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
}
|
||||||
.detail-save {
|
.detail-save {
|
||||||
margin-top: var(--space-4);
|
margin-top: var(--space-4);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,9 @@ test("local correlation filters combine with tabs and survive saved views", asyn
|
|||||||
page,
|
page,
|
||||||
}) => {
|
}) => {
|
||||||
let params = new URLSearchParams();
|
let params = new URLSearchParams();
|
||||||
|
let searches = 0;
|
||||||
await page.route(/\/api\/v1\/alphas\?/, async (route) => {
|
await page.route(/\/api\/v1\/alphas\?/, async (route) => {
|
||||||
|
searches += 1;
|
||||||
params = new URL(route.request().url()).searchParams;
|
params = new URL(route.request().url()).searchParams;
|
||||||
await route.fulfill({
|
await route.fulfill({
|
||||||
json: { items: [], total: 0, limit: 25, offset: 0 },
|
json: { items: [], total: 0, limit: 25, offset: 0 },
|
||||||
@@ -21,9 +23,7 @@ test("local correlation filters combine with tabs and survive saved views", asyn
|
|||||||
await page
|
await page
|
||||||
.getByRole("textbox", { name: "搜索 Alpha", exact: true })
|
.getByRole("textbox", { name: "搜索 Alpha", exact: true })
|
||||||
.fill("candidate");
|
.fill("candidate");
|
||||||
await page
|
await page.getByText("全部状态", { exact: true }).click();
|
||||||
.getByText("全部状态", { exact: true })
|
|
||||||
.click();
|
|
||||||
await page.getByRole("option", { name: /相关性偏高/ }).click();
|
await page.getByRole("option", { name: /相关性偏高/ }).click();
|
||||||
await page.getByText("更多筛选", { exact: true }).click();
|
await page.getByText("更多筛选", { exact: true }).click();
|
||||||
await page
|
await page
|
||||||
@@ -51,6 +51,17 @@ test("local correlation filters combine with tabs and survive saved views", asyn
|
|||||||
expect(params.get("local_correlation_status")).toBe("high");
|
expect(params.get("local_correlation_status")).toBe("high");
|
||||||
expect(params.get("local_correlation_min")).toBe("0.7");
|
expect(params.get("local_correlation_min")).toBe("0.7");
|
||||||
expect(params.get("local_correlation_max")).toBe("0.75");
|
expect(params.get("local_correlation_max")).toBe("0.75");
|
||||||
|
const refresh = page.getByRole("button", {
|
||||||
|
name: "刷新 Alpha 列表",
|
||||||
|
exact: true,
|
||||||
|
});
|
||||||
|
await expect(refresh).toBeEnabled();
|
||||||
|
const before = searches;
|
||||||
|
const savedQuery = params.toString();
|
||||||
|
await refresh.click();
|
||||||
|
await expect.poll(() => searches).toBeGreaterThan(before);
|
||||||
|
expect(params.toString()).toBe(savedQuery);
|
||||||
|
await expect(saved).toHaveAttribute("aria-selected", "true");
|
||||||
await blocked.click();
|
await blocked.click();
|
||||||
await page.getByRole("button", { name: "筛选 Alpha", exact: true }).click();
|
await page.getByRole("button", { name: "筛选 Alpha", exact: true }).click();
|
||||||
await page.getByRole("button", { name: "重置", exact: true }).click();
|
await page.getByRole("button", { name: "重置", exact: true }).click();
|
||||||
|
|||||||
Reference in New Issue
Block a user