Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] suggestions json tests #142

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions suggestions/bookmarks-history-open-tabs-basic.json
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@
"subtitle": "apple.com/mac",
"uri": "https://www.apple.com/mac/",
"score": 307211,
"tabId": "6d5af67d-a2f4-4acb-9f39-6bd7baa378eb"
},
{
"type": "openTab",
Expand Down Expand Up @@ -313,4 +312,4 @@
}
]
}
}
}
3 changes: 1 addition & 2 deletions suggestions/favorite-duped-open-tab.json
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@
"subtitle": "apple.com/mac",
"uri": "https://www.apple.com/mac/",
"score": 204811,
"tabId": "6d5af67d-a2f4-4acb-9f39-6bd7baa378eb"
},
{
"type": "openTab",
Expand Down Expand Up @@ -313,4 +312,4 @@
}
]
}
}
}
14 changes: 7 additions & 7 deletions suggestions/suggestions-regular-window-tabs.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
{ "tabId": "fbd713a1-a7a5-4843-8b50-3775f2ce1299", "title": "Selected Tab", "uri": "https://another-example.com" },
{ "tabId": "f4386ef1-675d-43f0-b0d3-868488ab9c56", "title": "New Tab", "uri": "duck://newtab" },
{ "tabId": "8f64b4b9-2aac-4d34-bbf6-4641de875d14", "title": "Bookmarks", "uri": "duck://bookmarks" },
{ "tabId": "6c4c6dfd-f8a7-421d-9b8c-a5d3ec94bea4", "title": "Settings", "uri": "duck://settings" },
{ "tabId": "a0b0354b-223f-4a0b-81a7-3d7d4e5b72ff", "title": "Last Tab", "uri": "https://last.com" }
{ "tabId": "6c4c6dfd-f8a7-421d-9b8c-a5d3ec94bea4", "title": "Settings", "uri": "duck://settings" }
]
},
{
"type": "fullyFeatured",
"tabs": [
{ "tabId": "9e5218ca-a187-4481-a193-4284c5657ea1", "title": "Yet Another Example", "uri": "https://yet-another-example.com" },
{ "tabId": "ccd16104-1655-41da-a250-04d41daa0d4f", "title": "Yet Another Example", "uri": "https://yet-another-example.com" },
{ "tabId": "1daf539e-7b40-4757-a8f3-06d48016058c", "title": "Duplicate to Selected Tab", "uri": "https://another-example.com" }
{ "tabId": "1daf539e-7b40-4757-a8f3-06d48016058c", "title": "Duplicate to Selected Tab", "uri": "https://another-example.com" },
{ "tabId": "a0b0354b-223f-4a0b-81a7-3d7d4e5b72ff", "title": "Last Tab", "uri": "https://last.com" }
]
},
{
Expand All @@ -50,10 +50,10 @@
"topHits": [],
"searchSuggestions": [],
"localSuggestions": [
{ "type": "openTab", "title": "New Tab", "subtitle": "DuckDuckGo", "score": 153600, "uri": "duck://newtab", "tabId": "f4386ef1-675d-43f0-b0d3-868488ab9c56" },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Windows side, we still have this entry as the top local suggestion with the 153600 score. It looks like it's being scored correctly and should be the top local suggestion result. Do you know why it isn't ending up here on macOS?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not shown in open tab suggestions because it's a local New Tab page (duck://newtab) and we only show Settings and Bookmarks local page open tab suggestions

{ "type": "openTab", "title": "Last Tab", "subtitle": "last.com", "score": 102400, "uri": "https://last.com", "tabId": "a0b0354b-223f-4a0b-81a7-3d7d4e5b72ff" },
{ "type": "openTab", "title": "Duplicate to Selected Tab", "subtitle": "another-example.com", "score": 102400, "uri": "https://another-example.com", "tabId": "1daf539e-7b40-4757-a8f3-06d48016058c" },
{ "type": "openTab", "title": "Pinned tab 1", "subtitle": "pinned-example.com", "score": 102400, "uri": "https://pinned-example.com", "tabId": "438165a0-b444-4165-8b28-5b01ada66b05" }
{ "type": "openTab", "title": "Pinned tab 1", "subtitle": "pinned-example.com", "score": 102400, "uri": "https://pinned-example.com" },
{ "type": "openTab", "title": "Pinned tab 2", "subtitle": "pinned-example-2.com", "score": 102400, "uri": "https://pinned-example-2.com" },
{ "type": "openTab", "title": "Selected Tab", "subtitle": "another-example.com", "score": 102400, "uri": "https://another-example.com", "tabId": "FBD713A1-A7A5-4843-8B50-3775F2CE1299" },
{ "type": "openTab", "title": "Last Tab", "subtitle": "last.com", "score": 102400, "uri": "https://last.com", "tabId": "a0b0354b-223f-4a0b-81a7-3d7d4e5b72ff" }
]
}
}
Loading