Command filter: two presets, and a "Selected: N" summary (v2.7.2)
- the 'Proactive + events' preset is gone: the proactive one (FETCH, TERMINAL PROFILE and the SW 91xx initiators) plus the individual ENVELOPE entry cover it, and its Russian key is removed with it - with several entries checked the filter button now reads "Selected: N" («Выбрано: N») instead of "N commands"; a single entry keeps showing its name and an empty selection stays "All commands" - tests: the removed preset's case is replaced by an absence pin in the menu test, and the summary case follows the new wording; 527 Python + 72 Node tests - README/README_RUS list two presets; PWA_VERSION/pyproject/version.py 2.7.2, SW cache simtrace-analyser-v82
This commit is contained in:
1 parent
024527ada4
commit
bc6fcc02c2
8 files changed
+14
-28
No files matched your search
@@ -100,13 +100,6 @@ test('FETCH and TERMINAL RESPONSE are separate commands now', () => {
|
||||
assert.equal(matchesFilter(gr, 1, set), true);
|
||||
});
|
||||
|
||||
test('the proactive+events preset adds ENVELOPE', () => {
|
||||
const set = new Set(['preset:proactive-events']);
|
||||
assert.equal(matchesFilter(msg('ENVELOPE'), 0, set), true);
|
||||
assert.equal(matchesFilter(msg('FETCH'), 0, set), true);
|
||||
assert.equal(matchesFilter(msg('SELECT'), 0, set), false);
|
||||
});
|
||||
|
||||
test('the file-operations preset covers the five commands and their replies', () => {
|
||||
const set = new Set(['preset:files']);
|
||||
for (const name of ['SELECT', 'READ BINARY', 'READ RECORD', 'UPDATE BINARY',
|
||||
@@ -137,7 +130,7 @@ test('the summary follows the selection', () => {
|
||||
STATE.filter.add('preset:files');
|
||||
assert.equal(filterSummary(), 'File operations');
|
||||
STATE.filter.add('cmd:FETCH');
|
||||
assert.equal(filterSummary(), '2 commands');
|
||||
assert.equal(filterSummary(), 'Selected: 2');
|
||||
});
|
||||
|
||||
test('the menu lists the presets and the commands with their counts', () => {
|
||||
@@ -150,8 +143,8 @@ test('the menu lists the presets and the commands with their counts', () => {
|
||||
el = id => (id === 'filter-menu' ? menu : btn);
|
||||
renderFilterMenu(true);
|
||||
assert.match(menu.innerHTML, /data-filter="preset:proactive"/);
|
||||
assert.match(menu.innerHTML, /data-filter="preset:proactive-events"/);
|
||||
assert.match(menu.innerHTML, /data-filter="preset:files"/);
|
||||
assert.doesNotMatch(menu.innerHTML, /preset:proactive-events/);
|
||||
assert.match(menu.innerHTML, /data-filter="cmd:SELECT"/);
|
||||
assert.match(menu.innerHTML, /<span class="filter-count">2<\/span>/);
|
||||
assert.match(menu.innerHTML, /data-filter="all" checked>/);
|
||||
@@ -171,7 +164,7 @@ test('the filter strings carry Russian translations', () => {
|
||||
keys.add(m[1].replace(/\\(['\\])/g, '$1'));
|
||||
}
|
||||
for (const s of ['All commands', 'Presets', 'Commands', 'Proactive sessions',
|
||||
'Proactive + events', 'File operations', '{n} commands']) {
|
||||
'File operations', 'Selected: {n}']) {
|
||||
assert.ok(keys.has(s), 'no LANG_RU entry for: ' + s);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user