feat: continue cleared queues into Agenda (Closes #697)
This commit is contained in:
parent
15d197327a
commit
5cdb3f7b3e
|
|
@ -11,6 +11,7 @@
|
|||
const continuation = [
|
||||
['attention', 'Start Attention'],
|
||||
['today', 'Continue Today'],
|
||||
['agenda', 'Open Agenda'],
|
||||
['later', 'Start Later'],
|
||||
['draft', 'Open Drafts'],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -372,7 +372,7 @@ def test_mobile_queue_launcher_recommends_and_revalidates_cross_queue_continuati
|
|||
script = f"""
|
||||
const createLauncher = require({json.dumps(str(QUEUE_LAUNCHER))});
|
||||
const calls = [];
|
||||
let counts = {{attention: 2, today: 1, later: 4, draft: 3}};
|
||||
let counts = {{attention: 2, today: 1, agenda: 5, later: 4, draft: 3}};
|
||||
const launcher = createLauncher({{
|
||||
openToday: () => calls.push('today'),
|
||||
selectFilter: name => calls.push('filter:' + name),
|
||||
|
|
@ -382,21 +382,23 @@ const launcher = createLauncher({{
|
|||
openFindWork: () => calls.push('find'),
|
||||
}});
|
||||
const first = launcher.recommend();
|
||||
counts = {{attention: 0, today: 0, later: 4, draft: 3}};
|
||||
counts = {{attention: 0, today: 0, agenda: 5, later: 4, draft: 3}};
|
||||
const agenda = launcher.recommend();
|
||||
const opened = launcher.continueWork();
|
||||
counts = {{attention: 0, today: 0, later: 0, draft: 0}};
|
||||
counts = {{attention: 0, today: 0, agenda: 0, later: 0, draft: 0}};
|
||||
const fallback = launcher.recommend();
|
||||
launcher.continueWork();
|
||||
process.stdout.write(JSON.stringify({{first, opened, fallback, calls}}));
|
||||
process.stdout.write(JSON.stringify({{first, agenda, opened, fallback, calls}}));
|
||||
"""
|
||||
result = subprocess.run(["node", "-e", script], capture_output=True, text=True)
|
||||
|
||||
assert result.returncode == 0, result.stderr
|
||||
assert json.loads(result.stdout) == {
|
||||
"first": {"name": "attention", "count": 2, "label": "Start Attention (2)"},
|
||||
"agenda": {"name": "agenda", "count": 5, "label": "Open Agenda (5)"},
|
||||
"opened": "opened",
|
||||
"fallback": {"name": "find", "count": 0, "label": "Find Work"},
|
||||
"calls": ["filter:later", "open:later", "find"],
|
||||
"calls": ["filter:agenda", "open:agenda", "find"],
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user