FEAT: Video Search In Discovery
Build, Push and Deploy Discovery / build-push-deploy (push) Successful in 1m57s
Build, Push and Deploy Discovery / build-push-deploy (push) Successful in 1m57s
This commit is contained in:
@@ -48,6 +48,24 @@ type world struct {
|
||||
// catalogued is the read side's own copy of the video, once a step has
|
||||
// waited for it to arrive.
|
||||
catalogued *catalogueVideoBody
|
||||
|
||||
// searchTitle is the exact title the scenario's video was catalogued
|
||||
// under. Scenarios name a plain title like "Desert Falcons"; the step
|
||||
// registering it appends a nonce, because nothing cleans up between runs
|
||||
// and a title reused across runs would make a result count meaningless.
|
||||
searchTitle string
|
||||
|
||||
// results is the last page the catalogue search answered with.
|
||||
results searchResultsBody
|
||||
|
||||
// pageSeen accumulates the ids from every page a paging scenario has
|
||||
// walked, so it can assert the pages tile the results rather than
|
||||
// repeating or dropping one.
|
||||
pageSeen []string
|
||||
|
||||
// cohort is the ids of the videos a scenario catalogued together under one
|
||||
// shared title, in the order they were created.
|
||||
cohort []string
|
||||
}
|
||||
|
||||
type worldKey struct{}
|
||||
@@ -186,6 +204,24 @@ func TestVideoUpload(t *testing.T) {
|
||||
suite.AddStep(`^the catalogue does not hold that video$`, theCatalogueDoesNotHoldThatVideo)
|
||||
suite.AddStep(`^the catalogue eventually holds that video with no playback URL$`, theCatalogueEventuallyHoldsThatVideoWithNoPlaybackURL)
|
||||
suite.AddStep(`^the catalogue's copy carries its title, playback URL and categories$`, theCataloguesCopyCarriesTheDetails)
|
||||
suite.AddStep(`^the catalogue holds a video titled "([^"]*)"$`, theCatalogueHoldsAVideoTitled)
|
||||
suite.AddStep(`^I search the catalogue for that video's title$`, searchTheCatalogueForThatTitle)
|
||||
suite.AddStep(`^I search the catalogue for "([^"]*)"$`, searchTheCatalogueFor)
|
||||
suite.AddStep(`^the catalogue holds a video titled "([^"]*)" filed under "([^"]*)"$`, theCatalogueHoldsAVideoTitledUnder)
|
||||
suite.AddStep(`^I search the catalogue for that video's title in category "([^"]*)"$`, searchTheCatalogueForThatTitleInCategory)
|
||||
suite.AddStep(`^I search the catalogue for that video's title in categories "([^"]*)"$`, searchTheCatalogueForThatTitleInCategories)
|
||||
suite.AddStep(`^the catalogue holds (\d+) videos titled "([^"]*)"$`, theCatalogueHoldsVideosTitled)
|
||||
suite.AddStep(`^I search the catalogue for that title (\d+) at a time$`, searchTheCatalogueForThatTitleAPageAtATime)
|
||||
suite.AddStep(`^I search the whole catalogue (\d+) at a time$`, searchTheWholeCatalogue)
|
||||
suite.AddStep(`^I follow the cursor$`, followTheCursor)
|
||||
suite.AddStep(`^I search the catalogue for that video's title from the cursor "([^"]*)"$`, searchTheCatalogueFromCursor)
|
||||
suite.AddStep(`^the search returns (\d+) videos?$`, theSearchReturnsNVideos)
|
||||
suite.AddStep(`^the search returns at most (\d+) videos$`, theSearchReturnsAtMostNVideos)
|
||||
suite.AddStep(`^the search offers a cursor to the next page$`, theSearchOffersACursor)
|
||||
suite.AddStep(`^the search offers no further cursor$`, theSearchOffersNoFurtherCursor)
|
||||
suite.AddStep(`^the pages together hold every one of those videos exactly once$`, thePagesTileTheCohort)
|
||||
suite.AddStep(`^the search does not return that video$`, theSearchDoesNotReturnThatVideo)
|
||||
suite.AddStep(`^the search returns that video$`, theSearchReturnsThatVideo)
|
||||
suite.AddStep(`^I register the uploaded video titled "(.*)" under categories "(.*)"$`, registerUploadedVideo)
|
||||
suite.AddStep(`^I register the uploaded video titled "(.*)" under category id (\d+)$`, registerUnderCategoryID)
|
||||
suite.AddStep(`^I register a video titled "(.*)" with the key "(.*)" under categories "(.*)"$`, registerWithKey)
|
||||
|
||||
Reference in New Issue
Block a user