Continue cleared mobile queues into Agenda deadlines #698
|
|
@ -11,6 +11,7 @@
|
||||||
const continuation = [
|
const continuation = [
|
||||||
['attention', 'Start Attention'],
|
['attention', 'Start Attention'],
|
||||||
['today', 'Continue Today'],
|
['today', 'Continue Today'],
|
||||||
|
['agenda', 'Open Agenda'],
|
||||||
['later', 'Start Later'],
|
['later', 'Start Later'],
|
||||||
['draft', 'Open Drafts'],
|
['draft', 'Open Drafts'],
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -372,7 +372,7 @@ def test_mobile_queue_launcher_recommends_and_revalidates_cross_queue_continuati
|
||||||
script = f"""
|
script = f"""
|
||||||
const createLauncher = require({json.dumps(str(QUEUE_LAUNCHER))});
|
const createLauncher = require({json.dumps(str(QUEUE_LAUNCHER))});
|
||||||
const calls = [];
|
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({{
|
const launcher = createLauncher({{
|
||||||
openToday: () => calls.push('today'),
|
openToday: () => calls.push('today'),
|
||||||
selectFilter: name => calls.push('filter:' + name),
|
selectFilter: name => calls.push('filter:' + name),
|
||||||
|
|
@ -382,21 +382,23 @@ const launcher = createLauncher({{
|
||||||
openFindWork: () => calls.push('find'),
|
openFindWork: () => calls.push('find'),
|
||||||
}});
|
}});
|
||||||
const first = launcher.recommend();
|
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();
|
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();
|
const fallback = launcher.recommend();
|
||||||
launcher.continueWork();
|
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)
|
result = subprocess.run(["node", "-e", script], capture_output=True, text=True)
|
||||||
|
|
||||||
assert result.returncode == 0, result.stderr
|
assert result.returncode == 0, result.stderr
|
||||||
assert json.loads(result.stdout) == {
|
assert json.loads(result.stdout) == {
|
||||||
"first": {"name": "attention", "count": 2, "label": "Start Attention (2)"},
|
"first": {"name": "attention", "count": 2, "label": "Start Attention (2)"},
|
||||||
|
"agenda": {"name": "agenda", "count": 5, "label": "Open Agenda (5)"},
|
||||||
"opened": "opened",
|
"opened": "opened",
|
||||||
"fallback": {"name": "find", "count": 0, "label": "Find Work"},
|
"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