The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

mickeyvip (17) [Avatar] Offline
If I am understanding correctly,
Fuzz.intRange 1 5
in listing 6.8 will generate at minimum 1, meaning the function

urlFuzzer : Fuzzer (List String)
urlFuzzer =
    Fuzz.intRange 1 5
        |> urlsFromCount

Will generate at minimum List of size 1.

Also "Customizing List Sizes" has those lines:

Fuzz.intRange will randomly generate an integer between 1 and 5. We’ll use it to build a list
between 1 and 5 elements. (We already have a test covering the zero-elements case: our
noPhotosNoThumbnails test from earlier.)

But in section "Simulating Click Events" we see:

There’s a problem with this approach. What if urlFuzzer happens to generate an empty list?
We’d have no photo to click!

Seems like a contradiction.