mirror of
https://codeberg.org/icewind/ugc-scaper.git
synced 2026-06-03 10:14:11 +02:00
team list
This commit is contained in:
parent
e20a9cdae9
commit
202917c318
12 changed files with 128772 additions and 5 deletions
2983
tests/data/lookup_2v2.html
Normal file
2983
tests/data/lookup_2v2.html
Normal file
File diff suppressed because it is too large
Load diff
7157
tests/data/lookup_4v4.html
Normal file
7157
tests/data/lookup_4v4.html
Normal file
File diff suppressed because it is too large
Load diff
11476
tests/data/lookup_6v6.html
Normal file
11476
tests/data/lookup_6v6.html
Normal file
File diff suppressed because it is too large
Load diff
11729
tests/data/lookup_9v9.html
Normal file
11729
tests/data/lookup_9v9.html
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1,8 +1,8 @@
|
|||
use insta::assert_json_snapshot;
|
||||
use std::fs::read_to_string;
|
||||
use ugc_scraper::parser::{
|
||||
Parser, PlayerDetailsParser, PlayerParser, SeasonsParser, TeamMatchesParser, TeamParser,
|
||||
TeamRosterHistoryParser,
|
||||
Parser, PlayerDetailsParser, PlayerParser, SeasonsParser, TeamLookupParser, TeamMatchesParser,
|
||||
TeamParser, TeamRosterHistoryParser,
|
||||
};
|
||||
|
||||
#[test]
|
||||
|
|
@ -60,3 +60,35 @@ fn test_parse_seasons_html() {
|
|||
let parsed = parser.parse(&body).unwrap();
|
||||
assert_json_snapshot!(parsed);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_seasons_9_html() {
|
||||
let body = read_to_string("tests/data/lookup_9v9.html").unwrap();
|
||||
let parser = TeamLookupParser::new();
|
||||
let parsed = parser.parse(&body).unwrap();
|
||||
assert_json_snapshot!(parsed);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_seasons_6_html() {
|
||||
let body = read_to_string("tests/data/lookup_6v6.html").unwrap();
|
||||
let parser = TeamLookupParser::new();
|
||||
let parsed = parser.parse(&body).unwrap();
|
||||
assert_json_snapshot!(parsed);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_seasons_4_html() {
|
||||
let body = read_to_string("tests/data/lookup_4v4.html").unwrap();
|
||||
let parser = TeamLookupParser::new();
|
||||
let parsed = parser.parse(&body).unwrap();
|
||||
assert_json_snapshot!(parsed);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_seasons_2_html() {
|
||||
let body = read_to_string("tests/data/lookup_2v2.html").unwrap();
|
||||
let parser = TeamLookupParser::new();
|
||||
let parsed = parser.parse(&body).unwrap();
|
||||
assert_json_snapshot!(parsed);
|
||||
}
|
||||
|
|
|
|||
2526
tests/snapshots/snapshot__parse_seasons_2_html.snap
Normal file
2526
tests/snapshots/snapshot__parse_seasons_2_html.snap
Normal file
File diff suppressed because it is too large
Load diff
19114
tests/snapshots/snapshot__parse_seasons_4_html.snap
Normal file
19114
tests/snapshots/snapshot__parse_seasons_4_html.snap
Normal file
File diff suppressed because it is too large
Load diff
36390
tests/snapshots/snapshot__parse_seasons_6_html.snap
Normal file
36390
tests/snapshots/snapshot__parse_seasons_6_html.snap
Normal file
File diff suppressed because it is too large
Load diff
37262
tests/snapshots/snapshot__parse_seasons_9_html.snap
Normal file
37262
tests/snapshots/snapshot__parse_seasons_9_html.snap
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue