@@ -17,24 +17,44 @@ def asana_task_url(task_id)
1717 end
1818
1919 describe "#extract_asana_task_id" do
20- it "extracts task ID" do
21- expect ( extract_asana_task_id ( "https://app.asana.com/0/0/0" ) ) . to eq ( "0" )
22- end
20+ context "v0 task URL" do
21+ it "extracts task ID" do
22+ expect ( extract_asana_task_id ( "https://app.asana.com/0/0/0" ) ) . to eq ( "0" )
23+ end
2324
24- it "extracts task ID when project ID is non-zero" do
25- expect ( extract_asana_task_id ( "https://app.asana.com/0/753241/9999" ) ) . to eq ( "9999" )
26- end
25+ it "extracts task ID when project ID is non-zero" do
26+ expect ( extract_asana_task_id ( "https://app.asana.com/0/753241/9999" ) ) . to eq ( "9999" )
27+ end
2728
28- it "extracts task ID when first digit is non-zero " do
29- expect ( extract_asana_task_id ( "https://app.asana.com/4/753241/9999 " ) ) . to eq ( "9999 " )
30- end
29+ it "extracts long task ID" do
30+ expect ( extract_asana_task_id ( "https://app.asana.com/0/0/12837864576817392 " ) ) . to eq ( "12837864576817392 " )
31+ end
3132
32- it "extracts long task ID" do
33- expect ( extract_asana_task_id ( "https://app.asana.com/0/0/12837864576817392" ) ) . to eq ( "12837864576817392" )
33+ it "extracts task ID from a URL in focused mode" do
34+ expect ( extract_asana_task_id ( "https://app.asana.com/0/0/1234/f" ) ) . to eq ( "1234" )
35+ end
3436 end
3537
36- it "extracts task ID from a URL with a trailing /f" do
37- expect ( extract_asana_task_id ( "https://app.asana.com/0/0/1234/f" ) ) . to eq ( "1234" )
38+ context "v1 task URL" do
39+ it "extracts task ID" do
40+ expect ( extract_asana_task_id ( "https://app.asana.com/1/1234/project/5678/task/9999" ) ) . to eq ( "9999" )
41+ end
42+
43+ it "extracts task ID when subtask is present" do
44+ expect ( extract_asana_task_id ( "https://app.asana.com/1/1234/project/5678/task/9999/subtask/0001" ) ) . to eq ( "9999" )
45+ end
46+
47+ it "extracts task ID when project is missing in the URL" do
48+ expect ( extract_asana_task_id ( "https://app.asana.com/1/1234/task/9999" ) ) . to eq ( "9999" )
49+ end
50+
51+ it "extracts long task ID" do
52+ expect ( extract_asana_task_id ( "https://app.asana.com/1/1234/task/12837864576817392" ) ) . to eq ( "12837864576817392" )
53+ end
54+
55+ it "extracts task ID from a URL in focused mode" do
56+ expect ( extract_asana_task_id ( "https://app.asana.com/1/1234/project/5678/task/9999?focused=true" ) ) . to eq ( "9999" )
57+ end
3858 end
3959
4060 it "sets GHA output" do
@@ -46,7 +66,7 @@ def asana_task_url(task_id)
4666
4767 it "fails when garbage is passed" do
4868 expect ( Fastlane ::UI ) . to receive ( :user_error! )
49- . with ( "URL has incorrect format (attempted to match #{ Fastlane ::Helper ::AsanaHelper ::ASANA_TASK_URL_REGEX } )" )
69+ . with ( "URL has incorrect format (attempted to match #{ Fastlane ::Helper ::AsanaHelper ::ASANA_V0_TASK_URL_REGEX } or #{ Fastlane :: Helper :: AsanaHelper :: ASANA_V1_TASK_URL_REGEX } )" )
5070
5171 extract_asana_task_id ( "not a URL" )
5272 end
@@ -556,6 +576,30 @@ def sanitize_asana_html_notes(content)
556576#{ ' ' }
557577 Task/Issue URL: https://app.asana.com/0/1202406491309510/1208589738926535/f
558578
579+ commit 7202ff2597d21db57fd6dc9a295e11991c81b3e7
580+
581+ Hide continue setup cards after 1 week (#3471)
582+ #{ ' ' }
583+ Task/Issue URL: https://app.asana.com/1/1552213/task/1208589738999999
584+
585+ commit 7202ff2597d21db57fd6dc9a295e11991c81b3e7
586+
587+ Hide continue setup cards after 1 week (#3471)
588+ #{ ' ' }
589+ Task/Issue URL: https://app.asana.com/1/1552213/task/1208589738888888?focus=true
590+
591+ commit 7202ff2597d21db57fd6dc9a295e11991c81b3e7
592+
593+ Hide continue setup cards after 1 week (#3471)
594+ #{ ' ' }
595+ Task/Issue URL: https://app.asana.com/1/1552213/project/123/task/1208589738777777?focus=true
596+
597+ commit 7202ff2597d21db57fd6dc9a295e11991c81b3e7
598+
599+ Hide continue setup cards after 1 week (#3471)
600+ #{ ' ' }
601+ Task/Issue URL: https://app.asana.com/1/1552213/project/123/task/1208589738666666/subtask/527?focus=true
602+
559603commit e83fd007c0bdf054658068a79f5b7ea45d846468
560604
561605 Receive privacy config updates in AddressBarModel on main thread (#3574)
@@ -593,7 +637,15 @@ def sanitize_asana_html_notes(content)
593637 allow ( Fastlane ::Helper ::AsanaHelper ) . to receive ( :` ) . with ( "git log v1.0.0..HEAD -- ./ ../BrowserServicesKit/" ) . and_return ( git_log )
594638
595639 task_ids = Fastlane ::Helper ::AsanaHelper . get_task_ids_from_git_log ( "v1.0.0" )
596- expect ( task_ids ) . to eq ( [ "1208700893044577" , "1208589738926535" , "1208804405760977" ] )
640+ expect ( task_ids ) . to eq ( [
641+ "1208700893044577" ,
642+ "1208589738926535" ,
643+ "1208589738999999" ,
644+ "1208589738888888" ,
645+ "1208589738777777" ,
646+ "1208589738666666" ,
647+ "1208804405760977"
648+ ] )
597649 end
598650
599651 it "returns an empty array if no task IDs are found" do
0 commit comments