Merge branch 'master' into feat/msg-queue-to-rust
Project CI / AI game creator shell Rust smoke (pull_request) Failing after 1m16s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Failing after 1m16s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 1m16s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m49s
Project CI / Frontend tests (pull_request) Successful in 4m14s
Project CI / Repository checks (pull_request) Successful in 4m34s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m13s
Project CI / Backend tests (pull_request) Successful in 7m10s
Project CI / Native shell tests (pull_request) Successful in 7m58s
Project CI / AI game creator shell Rust smoke (pull_request) Failing after 1m16s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Failing after 1m16s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 1m16s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m49s
Project CI / Frontend tests (pull_request) Successful in 4m14s
Project CI / Repository checks (pull_request) Successful in 4m34s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m13s
Project CI / Backend tests (pull_request) Successful in 7m10s
Project CI / Native shell tests (pull_request) Successful in 7m58s
This commit is contained in:
@@ -522,6 +522,32 @@ async function main() {
|
||||
mobileStartDisabled && rotationHint,
|
||||
`startDisabled=${mobileStartDisabled} rotationHint=${rotationHint}`,
|
||||
);
|
||||
// 游玩页是固定画布:面板必须是 overflow:hidden 且不溢出,整页也不能出现滚动条。
|
||||
// 面板自身 `overflow-x: hidden`,横向溢出只会被静默裁掉、不会出滚动条,所以两个方向都要量:
|
||||
// 只量 scrollHeight 会漏掉「卡片被裁一半」这类横向回归。
|
||||
const playScroll = await mobilePage.evaluate(() => {
|
||||
const panel = document.querySelector('.platform-tab-panel');
|
||||
return {
|
||||
documentOverflowY:
|
||||
document.documentElement.scrollHeight - window.innerHeight,
|
||||
documentOverflowX:
|
||||
document.documentElement.scrollWidth - window.innerWidth,
|
||||
panelOverflowY: panel ? panel.scrollHeight - panel.clientHeight : 0,
|
||||
panelOverflowX: panel ? panel.scrollWidth - panel.clientWidth : 0,
|
||||
panelOverflowStyle: panel
|
||||
? getComputedStyle(panel).overflowY
|
||||
: 'missing',
|
||||
};
|
||||
});
|
||||
check(
|
||||
'移动端游玩页不可滚动(面板与整页都不溢出)',
|
||||
playScroll.documentOverflowY <= 1 &&
|
||||
playScroll.documentOverflowX <= 1 &&
|
||||
playScroll.panelOverflowY <= 1 &&
|
||||
playScroll.panelOverflowX <= 1 &&
|
||||
playScroll.panelOverflowStyle === 'hidden',
|
||||
JSON.stringify(playScroll),
|
||||
);
|
||||
await mobile.close();
|
||||
await context.close();
|
||||
} finally {
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import { readFileSync } from 'node:fs';
|
||||
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
const productionNginx = readFileSync('deploy/nginx/genarrative.conf', 'utf8');
|
||||
const provisionScript = readFileSync(
|
||||
'scripts/jenkins-server-provision.sh',
|
||||
'utf8',
|
||||
);
|
||||
|
||||
describe('清智创游官网引擎下载路由', () => {
|
||||
it('生产 Nginx 为官网域名提供独立 vhost 和 API 反代', () => {
|
||||
expect(productionNginx).toContain(
|
||||
'server_name tsingnovagames.com www.tsingnovagames.com;',
|
||||
);
|
||||
expect(productionNginx).toMatch(
|
||||
/server_name tsingnovagames\.com www\.tsingnovagames\.com;[\s\S]*?location ~ \^\/api\(\?:\/\|\$\)[\s\S]*?proxy_pass http:\/\/genarrative_api;/u,
|
||||
);
|
||||
expect(productionNginx).toContain('try_files /home/index.html =404;');
|
||||
expect(productionNginx).toContain('location ^~ /home/');
|
||||
});
|
||||
|
||||
it('Server-Provision 会把正式证书路径渲染进官网 vhost', () => {
|
||||
expect(provisionScript).toContain(
|
||||
's|/etc/letsencrypt/live/genarrative.example.com/|/etc/letsencrypt/live/${SERVER_NAME}/|g',
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user