Search filters protobuf (#516)
* [Wip] search filters protobuf * Filters work * Small tweaks * changelog
This commit is contained in:
1 parent
c6853cd2fc
commit
564afd9685
19 files changed
+895
-10
No files matched your search
@@ -0,0 +1,40 @@
|
||||
namespace Tests
|
||||
|
||||
@SGNode("SearchFiltersTestNode")
|
||||
@suite
|
||||
class SearchFiltersTests extends Rooibos.BaseTestSuite
|
||||
|
||||
@describe("SearchFilters")
|
||||
|
||||
@it("Encodes search filters")
|
||||
function _()
|
||||
testCases = m.GetEncodingTestCases()
|
||||
for each testCase in testCases
|
||||
encoded = m.top@.Innertube_GetEncodedSearchFilters(testCase.input)
|
||||
m.assertEqual(encoded, testCase.encoded)
|
||||
end for
|
||||
end function
|
||||
|
||||
function GetEncodingTestCases() as object
|
||||
return [{
|
||||
input: {
|
||||
"sort": "date"
|
||||
}
|
||||
encoded: "CAISAA%3D%3D"
|
||||
}, {
|
||||
input: {
|
||||
"sort": "views"
|
||||
"features": ["3d", "hd", "live"]
|
||||
}
|
||||
encoded: "CAMSBiABOAFAAQ%3D%3D"
|
||||
}, {
|
||||
input: {
|
||||
"type": "playlist"
|
||||
}
|
||||
encoded: "EgIQAw%3D%3D"
|
||||
}]
|
||||
end function
|
||||
|
||||
end class
|
||||
|
||||
end namespace
|
||||
Reference in new issue
Block a user