Skip to content

Commit

Permalink
test(nav): add sampling tests for folders with files (#369)
Browse files Browse the repository at this point in the history
  • Loading branch information
plastikfan committed Nov 17, 2023
1 parent 0446725 commit 566d8c7
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions xfs/nav/traverse-sample_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,10 @@ var _ = Describe("Traverse With Sample", Ordered, func() {
prohibited: []string{"cover.night-drive.jpg"},
},
noOf: nav.SampleNoOf{
Files: 2,
Folders: 2,
Files: 2,
},
expectedNoOf: directoryQuantities{
files: 6,
files: 8,
},
}),

Expand Down Expand Up @@ -194,6 +193,34 @@ var _ = Describe("Traverse With Sample", Ordered, func() {
},
}),

Entry(nil, &sampleTE{
naviTE: naviTE{
message: "folders: default (first), with 2 folders",
should: "invoke for at most 2 folders per directory",
subscription: nav.SubscribeFoldersWithFiles,
prohibited: []string{"Electric Youth"},
},
noOf: nav.SampleNoOf{
Folders: 2,
},
expectedNoOf: directoryQuantities{
folders: 6,
},
}),

Entry(nil, &sampleTE{
naviTE: naviTE{
message: "folders: custom, with last single folder",
should: "invoke for only last folder per directory",
subscription: nav.SubscribeFoldersWithFiles,
prohibited: []string{"Chromatics"},
},
useLastFn: true,
noOf: nav.SampleNoOf{
Folders: 1,
},
}),

// TODO: With filter for folders: first Co* folder (College)

Entry(nil, &sampleTE{
Expand Down

0 comments on commit 566d8c7

Please sign in to comment.