Improve server picker layout and profile activation flow
This commit is contained in:
@@ -98,6 +98,8 @@ test('manual ping uses plain language and keeps results beside server names', ()
|
||||
assert.match(picker, /<span className="client-tooltip" role="tooltip">/);
|
||||
assert.doesNotMatch(picker, /TCP|Не проверен/);
|
||||
assert.match(picker, /<strong>\{server\.label\}<\/strong>[\s\S]*?<\/button>[\s\S]*?client-server-meta/);
|
||||
assert.match(picker, /\[server\.city, server\.country\]\.filter\(Boolean\)\.join\(' · '\)/);
|
||||
assert.match(picker, /is-scalable\$\{servers\.length <= SIMPLE_SERVER_LIMIT \? ' is-short' : ''\}/);
|
||||
assert.match(styles, /\.client-server-row \{[\s\S]*?grid-template-columns: minmax\(0, 1fr\) 120px minmax\(0, 1fr\);/);
|
||||
assert.match(styles, /\.client-server-row \.client-server \{[\s\S]*?width: 120px;/);
|
||||
assert.match(styles, /\.client-server-health \{[\s\S]*?font-size: 9px;[\s\S]*?font-variant-numeric: tabular-nums;/);
|
||||
@@ -129,4 +131,7 @@ test('server picker starts simple and reveals advanced controls on demand', () =
|
||||
assert.match(picker, /const SIMPLE_SERVER_LIMIT = 5/);
|
||||
assert.match(picker, /\.slice\(0, SIMPLE_SERVER_LIMIT\)/);
|
||||
assert.match(picker, /\{selected && <ServerRow/);
|
||||
assert.match(styles, /\.client-profile-body \.client-server-row \{[\s\S]*?grid-template-columns: minmax\(0, 1fr\) 64px;/);
|
||||
assert.match(styles, /\.client-profile-body \.client-server-row\.is-selected \{[\s\S]*?box-shadow: inset 2px 0 var\(--client-accent\);/);
|
||||
assert.match(styles, /\.client-profile-body \.client-server-check::after \{[\s\S]*?content: 'ПРОВЕРИТЬ ПИНГ';/);
|
||||
});
|
||||
|
||||
@@ -36,26 +36,26 @@ const expectedImports = [
|
||||
const sha256 = (value) => crypto.createHash('sha256').update(value).digest('hex');
|
||||
const acceptedLedger = {
|
||||
counts: {
|
||||
cascadeEdges: 780,
|
||||
cascadeEdges: 793,
|
||||
customProperties: 31,
|
||||
declarations: 2912,
|
||||
declarations: 2968,
|
||||
important: 0,
|
||||
keyframes: 49,
|
||||
media: 12,
|
||||
rules: 889,
|
||||
variableReferences: 330,
|
||||
media: 13,
|
||||
rules: 905,
|
||||
variableReferences: 340,
|
||||
},
|
||||
hashes: {
|
||||
cascadeEdges: '12a578504877454d14c734b8ce608766d061d3f8f809a5abf13513a645d8b6aa',
|
||||
cascadeEdges: '78b7ac8a4e6e39376dd811c0b66b7562b8562c800a332be259478e391996278b',
|
||||
customProperties: 'c7dd331e4bad898c450568999d8c9c6837e275a79c365c7680e143026fde4545',
|
||||
declarations: '297c4387ebbccec796e80474c4d040eba20941d316a77a29d1e72c31d19c02d6',
|
||||
declarations: '9935ad971bc1804c0f6bf50f26b6057f1f75fa66321af90cae8f8132a3275fac',
|
||||
duplicateKeyframes: '4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945',
|
||||
duplicateSelectors: 'bea7ed28b2e90fbaa3ae50aaee2346fc9063996fc9b7c585a3a47693a055b783',
|
||||
duplicateSelectors: 'c0ec5c96e48cd2ceed32aa5050383bcf29c3c0b8f1b440ed6883435e3e9b964d',
|
||||
keyframes: 'bde9c628dc86cb8a4299d5397eb7a81c5fbc9481136a073130991d3182d0799d',
|
||||
ruleDeclarationSequences: '7386a7be7efa9f3527d167b885fee0f208f236f6947ba3878a0f4acabd31e7a8',
|
||||
selectors: '845bd57c761ad3767b5a908fa004623d61dd4cdb838616ae0320093ffa1718eb',
|
||||
variableReferences: '6755baede1580eefde410ea7237ede30af629fbbabd5bc13fc83012a7e4132b2',
|
||||
witnesses: 'e5869e1f591f6a559ad9aa1942edcbb67b84ebe5ca6d22b4f6108dcba584a9f5',
|
||||
ruleDeclarationSequences: 'a62dc2ad887bd5fdba773e462e137eda397fc13b7b151bfc2ca16352d325ec60',
|
||||
selectors: '529b528153c3f4e0c565aa80ed9fefea52a8c02c4ae10a5e807a961eb81ebefd',
|
||||
variableReferences: '0189ffef214066db38a0ed0b8bfba18150353da5a09589ef1f606e5651cd25f7',
|
||||
witnesses: '770af3da2a817c9bc2bd593aeb1c21fe81b36fd7f86bf24e47d8ae844719feaa',
|
||||
},
|
||||
};
|
||||
|
||||
@@ -110,7 +110,7 @@ test('tokens, shared primitives, and feature styles have one explicit owner', ()
|
||||
|
||||
test('accepted stylesheet has pinned declaration, selector, keyframe, variable, and cascade ledgers', () => {
|
||||
const witnesses = readStyleWitnesses(root);
|
||||
assert.equal(witnesses.length, 740);
|
||||
assert.equal(witnesses.length, 745);
|
||||
assert.equal(witnesses.filter((witness) => witness.unknown || witness.ancestorUnknown).length, 0);
|
||||
const ledger = createStyleLedger(readStyleSource(root), { witnesses });
|
||||
assert.deepEqual(ledger.counts, acceptedLedger.counts);
|
||||
@@ -123,7 +123,6 @@ test('every live production selector has an expanded DOM witness', () => {
|
||||
'.client-diagnostics-section-title button',
|
||||
'.client-diagnostics-section-title button:disabled',
|
||||
'.client-diagnostics-section-title button:focus-visible',
|
||||
'.client-server small',
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -307,8 +306,8 @@ test('main owns one public stylesheet and the regrouped production CSS is determ
|
||||
assert.equal((main.match(/import ['"][^'"]+\.css['"]/g) || []).length, 1);
|
||||
|
||||
const assets = fs.readdirSync(path.join(root, 'dist/assets')).filter((file) => file.endsWith('.css'));
|
||||
assert.deepEqual(assets, ['index-COUqegc1.css']);
|
||||
assert.deepEqual(assets, ['index-Bl9ybRZ0.css']);
|
||||
const built = fs.readFileSync(path.join(root, 'dist/assets', assets[0]));
|
||||
assert.equal(built.byteLength, 108951);
|
||||
assert.equal(sha256(built), '059653e70cd17fb84953e19b8280dcb9b926760c1781fb19382820434f9d1f01');
|
||||
assert.equal(built.byteLength, 111207);
|
||||
assert.equal(sha256(built), '236deba70723e5bfe8e49fc0514f2c8b8fc0c1354664a37d5b37e6b22ac0c156');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user