feat: open assigned pulls from mobile search (Closes #785)
This commit is contained in:
1 parent
70281bb56a
commit
20d4f1ef7e
2 files changed
+26
-9
No files matched your search
@@ -297,9 +297,27 @@ def test_remote_search_selection_opens_native_preview_without_navigation():
|
||||
def test_assigned_issue_preview_hands_off_to_existing_my_work_sheet():
|
||||
html = dashboard_bundle_text()
|
||||
|
||||
assert "detail.claimable || (detail.assigned_to_me && detail.kind === 'issue')" in html
|
||||
assert "claimButton.hidden = !(detail.claimable || detail.assigned_to_me)" in html
|
||||
assert "claimButton.textContent = detail.assigned_to_me ? 'Open in My Work' : 'Assign to me'" in html
|
||||
assert "openPreviewIssueInMyWork" in html
|
||||
assert "openPreviewWorkInMyWork" in html
|
||||
|
||||
|
||||
def test_assigned_pull_preview_hands_off_to_existing_my_work_sheet_without_claiming():
|
||||
html = dashboard_bundle_text()
|
||||
|
||||
assert "claimButton.hidden = !(detail.claimable || detail.assigned_to_me)" in html
|
||||
assert "async function openPreviewWorkInMyWork(detail)" in html
|
||||
handoff = html.split("async function openPreviewWorkInMyWork(detail)", 1)[1].split(
|
||||
"function runCommandItem", 1
|
||||
)[0]
|
||||
assert "candidate.kind === detail.kind" in handoff
|
||||
assert "candidate.key === detail.repository + '#' + detail.number" in handoff
|
||||
|
||||
click_handler = html.split(
|
||||
"qs('#claim-search-result').addEventListener('click'", 1
|
||||
)[1].split("qs('#start-search-result')", 1)[0]
|
||||
assert "if (claimed.claimable) await searchPreview.claim(claimed)" in click_handler
|
||||
assert "await openPreviewWorkInMyWork(claimed)" in click_handler
|
||||
|
||||
|
||||
def test_search_preview_offers_assign_and_start_for_eligible_issues():
|
||||
|
||||
Reference in new issue
Block a user