fix: 固化出摊服务按钮跨端样式契约
This commit is contained in:
1 parent
056e7d3711
commit
9d2038cc93
3 files changed
+11
-2
No files matched your search
@@ -26,6 +26,12 @@ test("真实 API 驱动首页、出摊和主理人视觉槽位", async ({ page }
|
|||||||
expect(Math.abs(widths.image - widths.parent)).toBeLessThan(2);
|
expect(Math.abs(widths.image - widths.parent)).toBeLessThan(2);
|
||||||
await page.getByText("出摊服务", { exact: true }).click();
|
await page.getByText("出摊服务", { exact: true }).click();
|
||||||
await expect(page.locator(".schedule")).toHaveCount(2);
|
await expect(page.locator(".schedule")).toHaveCount(2);
|
||||||
|
await expect(page.locator(".process-action")).toHaveCount(1);
|
||||||
|
const processAction = await page.locator(".process-action").boundingBox();
|
||||||
|
const processFoot = await page.locator(".process-foot").boundingBox();
|
||||||
|
expect(processAction!.x + processAction!.width).toBeLessThanOrEqual(
|
||||||
|
processFoot!.x + processFoot!.width + 1,
|
||||||
|
);
|
||||||
await expect(page.locator(".delivery-item")).toHaveCount(2);
|
await expect(page.locator(".delivery-item")).toHaveCount(2);
|
||||||
await expect(page.locator(".step")).toHaveCount(4);
|
await expect(page.locator(".step")).toHaveCount(4);
|
||||||
await page.screenshot({
|
await page.screenshot({
|
||||||
|
|||||||
@@ -200,7 +200,9 @@ function Service({ workspace }: { workspace: RuntimeWorkspace }) {
|
|||||||
)}
|
)}
|
||||||
<Text>{text(process.config.refundNote)}</Text>
|
<Text>{text(process.config.refundNote)}</Text>
|
||||||
</View>
|
</View>
|
||||||
<Button onClick={() => navigate("inquiry")}>{p.processAction || "立即咨询"} →</Button>
|
<Button className="process-action" onClick={() => navigate("inquiry")}>
|
||||||
|
{p.processAction || "立即咨询"} →
|
||||||
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -440,7 +440,8 @@
|
|||||||
margin: 0 8px;
|
margin: 0 8px;
|
||||||
color: #d0cbc4;
|
color: #d0cbc4;
|
||||||
}
|
}
|
||||||
.food-service .process-foot button {
|
.food-service .process-foot button,
|
||||||
|
.food-service .process-foot .process-action {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
max-width: 42%;
|
max-width: 42%;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
|||||||
Reference in new issue
Block a user