feat: continue mobile Work into Filed follow-up (Closes #1008)
This commit is contained in:
1 parent
021af60cf3
commit
d64c646b68
3 files changed
+32
-3
No files matched your search
@@ -485,6 +485,33 @@ process.stdout.write(JSON.stringify({{result, calls}}));
|
||||
}
|
||||
|
||||
|
||||
def test_mobile_work_continues_into_filed_follow_up_before_later_work():
|
||||
script = f"""
|
||||
const createLauncher = require({json.dumps(str(QUEUE_LAUNCHER))});
|
||||
const calls = [];
|
||||
let counts = {{attention:0, today:0, update:0, agenda:0, filed:2, later:4, draft:3}};
|
||||
const launcher = createLauncher({{
|
||||
getCounts: () => counts,
|
||||
openFiled: () => {{ calls.push('filed-follow-up'); return 'opened-filed'; }},
|
||||
selectFilter: name => calls.push('filter:' + name),
|
||||
firstAction: () => null,
|
||||
announce: () => {{}},
|
||||
openFindWork: () => calls.push('find'),
|
||||
}});
|
||||
const recommendation = launcher.recommend();
|
||||
const opened = launcher.continueWork();
|
||||
process.stdout.write(JSON.stringify({{recommendation, opened, calls}}));
|
||||
"""
|
||||
result = subprocess.run(["node", "-e", script], capture_output=True, text=True)
|
||||
|
||||
assert result.returncode == 0, result.stderr
|
||||
assert json.loads(result.stdout) == {
|
||||
"recommendation": {"name": "filed", "count": 2, "label": "Review Filed (2)"},
|
||||
"opened": "opened-filed",
|
||||
"calls": ["filed-follow-up"],
|
||||
}
|
||||
|
||||
|
||||
def test_mobile_queue_launcher_recommends_and_revalidates_cross_queue_continuation():
|
||||
script = f"""
|
||||
const createLauncher = require({json.dumps(str(QUEUE_LAUNCHER))});
|
||||
@@ -555,7 +582,7 @@ const work = {{attributes: {{}}, setAttribute(name, value) {{ this.attributes[na
|
||||
const workLabel = {{textContent:''}};
|
||||
const dock = createDock({{nav:{{}}, buttons:{{work}}, workLabel}});
|
||||
const labels = {{}};
|
||||
for (const mode of ['attention','update','agenda','later','draft']) {{
|
||||
for (const mode of ['attention','update','agenda','filed','later','draft']) {{
|
||||
dock.updateWork(mode);
|
||||
labels[mode] = [workLabel.textContent, work.attributes['aria-label']];
|
||||
}}
|
||||
@@ -568,6 +595,7 @@ process.stdout.write(JSON.stringify(labels));
|
||||
"attention": ["Attention", "Open Attention"],
|
||||
"update": ["Updates", "Resume Updates"],
|
||||
"agenda": ["Agenda", "Open Agenda"],
|
||||
"filed": ["Filed", "Open Filed"],
|
||||
"later": ["Later", "Open Later"],
|
||||
"draft": ["Drafts", "Open Drafts"],
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user