Contents

Potential matches

Testing potential match generation.

Scenario: Small multi-fandom exchange, only fandom tags.

  • Given I create the gift exchange "multifan3" with the following options
    valueminimummaximummatch
    prompts221
    fandoms111
  • And the user "test1" signs up for "multifan3" with the following prompts
    typefandoms
    requestPopular Fandom
    requestFandom of One
    offerRare Fandom 1
    offerFandom of One
  • And the user "test2" signs up for "multifan3" with the following prompts
    typefandoms
    requestRare Fandom 1
    requestRare Fandom 2
    offerPopular Fandom
    offerRare Fandom 2
  • And the user "test3" signs up for "multifan3" with the following prompts
    typefandoms
    requestRare Fandom 2
    requestRare Fandom 3
    offerPopular Fandom
    offerRare Fandom 2
  • When potential matches are generated for "multifan3"
  • Then the potential matches for "multifan3" should be
    offerrequest
    test1test2
    test2test1
    test2test3
    test3test1
    test3test2

Scenario: Unconstrained exchange.

  • Given I create the gift exchange "unconstrained3" with the following options
    valueminimummaximummatch
    prompts111
    characters110
  • And the user "test1" signs up for "unconstrained3" with the following prompts
    typecharacters
    requestEvil Villain
    offerEvil Villain
  • And the user "test2" signs up for "unconstrained3" with the following prompts
    typecharacters
    requestSweet Protagonist
    offerSweet Protagonist
  • And the user "test3" signs up for "unconstrained3" with the following prompts
    typecharacters
    requestMorally Grey
    offerMorally Grey
  • When potential matches are generated for "unconstrained3"
  • Then the potential matches for "unconstrained3" should be
    offerrequest
    test1test2
    test1test3
    test2test1
    test2test3
    test3test1
    test3test2

Scenario: Unconstrained exchange with no tags.

  • Given I create the gift exchange "no_tags3" with the following options
    valueminimummaximummatch
    prompts111
  • And the user "test1" signs up for "no_tags3" with the following prompts
    type
    request
    offer
  • And the user "test2" signs up for "no_tags3" with the following prompts
    type
    request
    offer
  • And the user "test3" signs up for "no_tags3" with the following prompts
    type
    request
    offer
  • When potential matches are generated for "no_tags3"
  • Then the potential matches for "no_tags3" should be
    offerrequest
    test1test2
    test1test3
    test2test1
    test2test3
    test3test1
    test3test2

Scenario: Constrained exchange with no matches.

  • Given I create the gift exchange "constrained3" with the following options
    valueminimummaximummatch
    prompts111
    characters111
  • And the user "test1" signs up for "constrained3" with the following prompts
    typecharacters
    requestEvil Villain
    offerEvil Villain
  • And the user "test2" signs up for "constrained3" with the following prompts
    typecharacters
    requestSweet Protagonist
    offerSweet Protagonist
  • And the user "test3" signs up for "constrained3" with the following prompts
    typecharacters
    requestMorally Grey
    offerMorally Grey
  • When potential matches are generated for "constrained3"
  • Then there should be no potential matches for "constrained3"

Scenario: Exchange with someone offering Any.

  • Given I create the gift exchange "any_offer3" with the following options
    valueminimummaximummatch
    prompts111
    characters111
  • And the user "test1" signs up for "any_offer3" with the following prompts
    typecharacters
    requestEvil Villain
    offerany
  • And the user "test2" signs up for "any_offer3" with the following prompts
    typecharacters
    requestSweet Protagonist
    offerSweet Protagonist
  • And the user "test3" signs up for "any_offer3" with the following prompts
    typecharacters
    requestMorally Grey
    offerMorally Grey
  • When potential matches are generated for "any_offer3"
  • Then the potential matches for "any_offer3" should be
    offerrequest
    test1test2
    test1test3

Scenario: Exchange with someone requesting Any.

  • Given I create the gift exchange "any_request3" with the following options
    valueminimummaximummatch
    prompts111
    characters111
  • And the user "test1" signs up for "any_request3" with the following prompts
    typecharacters
    requestany
    offerEvil Villain
  • And the user "test2" signs up for "any_request3" with the following prompts
    typecharacters
    requestSweet Protagonist
    offerSweet Protagonist
  • And the user "test3" signs up for "any_request3" with the following prompts
    typecharacters
    requestMorally Grey
    offerMorally Grey
  • When potential matches are generated for "any_request3"
  • Then the potential matches for "any_request3" should be
    offerrequest
    test2test1
    test3test1

Scenario: Exchange with offers and requests for Any.

  • Given I create the gift exchange "any_both3" with the following options
    valueminimummaximummatch
    prompts111
    characters111
  • And the user "test1" signs up for "any_both3" with the following prompts
    typecharacters
    requestany
    offerEvil Villain
  • And the user "test2" signs up for "any_both3" with the following prompts
    typecharacters
    requestSweet Protagonist
    offerany
  • And the user "test3" signs up for "any_both3" with the following prompts
    typecharacters
    requestMorally Grey
    offerMorally Grey
  • When potential matches are generated for "any_both3"
  • Then the potential matches for "any_both3" should be
    offerrequest
    test2test1
    test2test3
    test3test1

Scenario: Exchange with ALL matching.

  • Given I create the gift exchange "all_matching3" with the following options
    valueminimummaximummatch
    prompts111
    characters14-1
  • And the user "test1" signs up for "all_matching3" with the following prompts
    typecharacters
    requestEvil Villain, Shy Friend
    offerEvil Villain, Shy Friend, Anti-Villain, Sweet Protagonist
  • And the user "test2" signs up for "all_matching3" with the following prompts
    typecharacters
    requestEvil Villain, Comic Relief, Sweet Protagonist
    offerEvil Villain, Comic Relief, Sweet Protagonist
  • And the user "test3" signs up for "all_matching3" with the following prompts
    typecharacters
    requestComic Relief
    offerShy Friend, Sweet Protagonist, Comic Relief
  • When potential matches are generated for "all_matching3"
  • Then the potential matches for "all_matching3" should be
    offerrequest
    test2test3

Scenario: Exchange with ALL and Any.

  • Given I create the gift exchange "all_and_any4" with the following options
    valueminimummaximummatch
    prompts111
    characters14-1
  • And the user "test1" signs up for "all_and_any4" with the following prompts
    typecharacters
    requestEvil Villain, Shy Friend
    offerany
  • And the user "test2" signs up for "all_and_any4" with the following prompts
    typecharacters
    requestEvil Villain, Comic Relief, Sweet Protagonist
    offerEvil Villain, Comic Relief, Sweet Protagonist
  • And the user "test3" signs up for "all_and_any4" with the following prompts
    typecharacters
    requestComic Relief
    offerShy Friend, Sweet Protagonist, Comic Relief
  • And the user "test4" signs up for "all_and_any4" with the following prompts
    typecharacters
    requestany
    offerShy Friend, Sweet Protagonist, Comic Relief
  • When potential matches are generated for "all_and_any4"
  • Then the potential matches for "all_and_any4" should be
    offerrequest
    test1test2
    test1test3
    test2test3
    test1test4
    test2test4
    test3test4
    test4test3

Scenario: Exchange with freeform restrictions.

  • Given I create the gift exchange "freeform4" with the following options
    valueminimummaximummatchunique
    prompts121n/a
    characters12-1no
    freeforms121no
  • And the user "test1" signs up for "freeform4" with the following prompts
    typecharactersfreeforms
    requestEvil VillainFic
    requestEvil Villain, Sweet ProtagonistFic, Art
    offerEvil Villain, Sweet ProtagonistFic
  • And the user "test2" signs up for "freeform4" with the following prompts
    typecharactersfreeforms
    requestComic ReliefFic
    requestWoobie of ChoiceArt
    offeranyArt
  • And the user "test3" signs up for "freeform4" with the following prompts
    typecharactersfreeforms
    requestSweet ProtagonistArt, Fic
    requestEvil Villain, Anti-VillainArt
    offerEvil Villain, Anti-VillainFic
  • And the user "test4" signs up for "freeform4" with the following prompts
    typecharactersfreeforms
    requestSweet ProtagonistFic
    offerComic Relief, Sweet ProtagonistFic
  • When potential matches are generated for "freeform4"
  • Then the potential matches for "freeform4" should be
    offerrequest
    test1test3
    test1test4
    test2test1
    test2test3
    test3test1
    test4test2
    test4test3

Scenario: Multi-fandom exchange with optional tags.

  • Given I create the gift exchange "optional3" with the following options
    valueminimummaximummatchoptionalany
    prompts221n/an/a
    fandoms111yesno
    characters111yesyes
  • And the user "bookfan" signs up for "optional3" with the following prompts
    typefandomscharactersoptional fandoms
    requestOut-of-Print BookRare Woobie
    requestRare BookObscure Character
    offerOut-of-Print BookanyRare Book
    offerPopular Bookany
  • And the user "showfan" signs up for "optional3" with the following prompts
    typefandomscharactersoptional fandoms
    request80s Cop ShowBadass Partner
    request90s Fantasy ShowWitty Protagonist
    offer80s Cop ShowBadass Partner
    offer90s Fantasy Showany00s SciFi Show
  • And the user "mixed" signs up for "optional3" with the following prompts
    typefandomscharactersoptional fandoms
    requestRare BookFandom Darling
    request00s SciFi ShowBounty Hunter
    offerPopular BookanyRare Book
    offer10s Drama Showany90s Fantasy Show
  • When potential matches are generated for "optional3"
  • Then the potential matches for "optional3" should be
    offerrequest
    mixedbookfan
    mixedshowfan
    bookfanmixed
    showfanmixed

Scenario: Exchange with optional tags and restrictions on a different type.

  • Given I create the gift exchange "optional4" with the following options
    valueminimummaximummatchoptionalanyunique
    prompts131n/an/an/a
    characters111yesnono
    freeforms111nonoyes
  • And the user "test1" signs up for "optional4" with the following prompts
    typecharacteroptional charactersfreeform
    requestWarlockFic
    requestWarlockArt
    offerWarlockWitch, MagicianFic
  • And the user "test2" signs up for "optional4" with the following prompts
    typecharacteroptional charactersfreeform
    requestMagicianHeadologistArt
    offerMagicianHeadologist, WarlockArt
  • And the user "test3" signs up for "optional4" with the following prompts
    typecharacteroptional charactersfreeform
    requestMagicianFic
    requestMagicianArt
    requestMagicianVid
    offerMagicianFic
    offerMagicianArt
    offerMagicianVid
  • And the user "test4" signs up for "optional4" with the following prompts
    typecharacteroptional charactersfreeform
    requestHeadologistSummoner, WitchVid
    offerHeadologistSummoner, WitchArt
    offerHeadologistSummoner, WitchVid
  • When potential matches are generated for "optional4"
  • Then the potential matches for "optional4" should be
    offerrequest
    test2test1
    test3test2
    test1test3
    test2test3
    test4test2

Source: features/gift_exchanges/potential_matches.feature at commit f09caa86, Otwarchive (GPL license).