Difference between revisions of "Template:Basketballstats/testcases"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
m (formatting)
imported>Trialpears
(Add rudimentary testcases for womens stats)
Line 81: Line 81:
 
|this should work; note that the Sandbox has Curry's Wikidata identifier hard-coded into it
 
|this should work; note that the Sandbox has Curry's Wikidata identifier hard-coded into it
 
|}
 
|}
 +
==WNBA/WBBR==
 +
=== WNBA ===
 +
{{Basketballstats/sandbox|wnba=katie-douglas}}
 +
 +
=== WNBA Basketball-Reference ===
 +
{{Basketballstats/sandbox|wbbr=d/douglka01w}}
 +
 +
=== Two links ===
 +
{{Basketballstats/sandbox|wnba=katie-douglas|wbbr=d/douglka01w}}

Revision as of 22:02, 6 August 2020

Template tests

Test cases here use {{Basketballstats}}

NBA (old ID)

URL:

Usage:

  • {{Basketballstats |nba= stephen_curry }}

Output:

NBA (new ID)

URL:

Usage:

  • {{Basketballstats |nba= stephen/curry/201939 }}

Output:

NBA (numeric ID)

URL:

Usage:

  • {{Basketballstats |nba= 201939 }}

Output:

Basketball-Reference

URL:

Usage:

  • {{Basketballstats |bbr= c/curryst01 }}

Output:

  • Career statistics and player information from NBA.comScript error: No such module "EditAtWikidata". or Basketball-Reference.comScript error: No such module "EditAtWikidata".
  • Career statistics and player information from WNBA.comScript error: No such module "EditAtWikidata". or Basketball-Reference.comScript error: No such module "EditAtWikidata".

Two links

{{Basketballstats |nba= stephen_curry |bbr= c/curryst01 }}

{{Basketballstats |nba= stephen/curry/201939 |bbr= c/curryst01 }}

{{Basketballstats |nba= 201939 |bbr= c/curryst01 }}

Sandbox tests

Test cases here use {{Basketballstats/sandbox}}

Test condition Player Template output Note
Current active player using name LeBron James (lebron_james) this should work
Current active player using ID Chris Paul (101108) this should work
Retired player using name Kobe Bryant (kobe_bryant) NBA.com link will not work
Retired player using ID Steve Nash (959) this should work
Retired player using ID (has career/ at end of URL) Kareem Abdul-Jabbar (76003) this should work
Using Wikidata Stephen Curry
  • Career statistics and player information from NBA.comScript error: No such module "EditAtWikidata". or Basketball-Reference.comScript error: No such module "EditAtWikidata".
  • Career statistics and player information from WNBA.comScript error: No such module "EditAtWikidata". or Basketball-Reference.comScript error: No such module "EditAtWikidata".
this should work; note that the Sandbox has Curry's Wikidata identifier hard-coded into it

WNBA/WBBR

WNBA

WNBA Basketball-Reference

  • Career statistics and player information from NBA.comScript error: No such module "EditAtWikidata". or Basketball-Reference.comScript error: No such module "EditAtWikidata".
  • Career statistics and player information from WNBA.comScript error: No such module "EditAtWikidata". or Basketball-Reference.comScript error: No such module "EditAtWikidata".

Two links