修改功能
This commit is contained in:
+12
-16
@@ -6,13 +6,9 @@ const test = require('node:test');
|
||||
const PageAvailability = require('../public/js/pending-pages.js');
|
||||
|
||||
const root = path.resolve(__dirname, '..');
|
||||
const familyPendingPages = [
|
||||
'profile-invite.html',
|
||||
];
|
||||
const familyPendingPages = [];
|
||||
|
||||
const contentPendingPages = [
|
||||
'profile-data-reminders.html'
|
||||
];
|
||||
const contentPendingPages = [];
|
||||
|
||||
const pendingPages = familyPendingPages.concat(contentPendingPages);
|
||||
|
||||
@@ -42,20 +38,20 @@ test('待开发页面显式加载状态脚本', () => {
|
||||
});
|
||||
});
|
||||
|
||||
test('缺少 PC 接口契约的页面不展示静态成员、邀请或奖励数据', () => {
|
||||
test('邀请和资料提醒页面使用 PC 接口,不展示静态伪数据', () => {
|
||||
const reminders = read('profile-data-reminders.html');
|
||||
const invite = read('profile-invite.html');
|
||||
const share = read('profile-share.html');
|
||||
|
||||
assert.match(reminders, /当前 PC 接口未提供资料缺项提醒列表/);
|
||||
assert.match(reminders, /public\/js\/profile-reminder-pages\.js/);
|
||||
assert.doesNotMatch(reminders, /鹿野 Loyel|张三|缺少出生日期/);
|
||||
assert.match(invite, /当前 PC 接口未提供邀请码/);
|
||||
assert.match(invite, /当前 PC 接口未提供邀请链接/);
|
||||
assert.doesNotMatch(invite, /data-invite-code|data-invite-link|加载中/);
|
||||
assert.match(share, /当前 PC 接口未提供分享链接或二维码/);
|
||||
assert.match(share, /当前 PC 接口未提供分享记录/);
|
||||
assert.match(share, /当前 PC 接口未提供收益账户或余额/);
|
||||
assert.match(share, /当前 PC 接口未提供提现方式、申请或记录/);
|
||||
assert.match(invite, /public\/js\/family-invite-pages\.js/);
|
||||
assert.match(invite, /data-invite-link/);
|
||||
assert.doesNotMatch(invite, /当前 PC 接口未提供邀请码|当前 PC 接口未提供邀请链接/);
|
||||
assert.match(share, /分享链接和二维码暂未开放,请先使用移动端分享/);
|
||||
assert.match(share, /分享记录暂未开放;推广收益和提现结果可在下方查看/);
|
||||
assert.match(share, /href="profile-earnings\.html"/);
|
||||
assert.doesNotMatch(share, /当前 PC 接口未提供收益账户或余额|当前 PC 接口未提供提现方式、申请或记录/);
|
||||
assert.doesNotMatch(share, /data-member-overview|data-invite-link|data-withdraw(?:-form|-record)|3 人访问|1 人完成注册|加载中/);
|
||||
assert.doesNotMatch(share, /data-feature-status="pending"|pending-pages\.js/);
|
||||
assert.match(share, /class="module-card is-unavailable" aria-disabled="true"/);
|
||||
@@ -115,7 +111,7 @@ test('待开发页面仅放行显式标记的可用功能入口', () => {
|
||||
assert.equal(PageAvailability.shouldBlockLink(createLink({ href: '#section' })), false);
|
||||
});
|
||||
|
||||
test('待开发邀请页允许返回已接入的成员管理', () => {
|
||||
test('邀请页允许返回已接入的成员管理', () => {
|
||||
const invite = read('profile-invite.html');
|
||||
|
||||
assert.match(invite, /href="profile-family-admin\.html"[^>]*data-feature-link="available"[^>]*data-genealogy-context-link/);
|
||||
|
||||
Reference in New Issue
Block a user