Skip to content

Commit

Permalink
ci: use browserless instead of reachable-url
Browse files Browse the repository at this point in the history
It seems Tesla URLs has akami protection
  • Loading branch information
Kikobeats committed Dec 20, 2023
1 parent c2fcb93 commit 3df91b6
Show file tree
Hide file tree
Showing 5 changed files with 1,400 additions and 24 deletions.
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,12 @@
"visualization",
"viz"
],
"dependencies": {
"reachable-url": "~1.7.0"
},
"devDependencies": {
"@commitlint/cli": "latest",
"@commitlint/config-conventional": "latest",
"@ksmithut/prettier-standard": "latest",
"ava": "latest",
"ava": "5",
"browserless": "latest",
"c8": "latest",
"ci-publish": "latest",
"conventional-github-releaser": "latest",
Expand All @@ -59,6 +57,9 @@
"nano-staged": "latest",
"npm-check-updates": "latest",
"p-map": "4",
"puppeteer": "latest",
"reachable-url": "latest",
"signal-exit": "latest",
"simple-git-hooks": "latest",
"standard": "latest",
"standard-markdown": "latest",
Expand Down
26 changes: 14 additions & 12 deletions test/model-3.js
Original file line number Diff line number Diff line change
Expand Up @@ -543,20 +543,22 @@ test('Model 3 2021', async t => {
t.snapshot(photos)
})

test('Model 3 Higland', async t => {
const optionCodes = []
const combinations = []

for (const interior of ['IPB2', 'IPB3', 'IPW2', 'IPW3']) {
for (const wheel of ['W38A', 'W39S']) {
for (const color of ['PPSW', 'PBSB', 'PPSB', 'PN01', 'PR01']) {
for (const chasis of ['MT351', 'MT352']) {
optionCodes.push([chasis, interior, wheel, color])
}
for (const interior of ['IPB2', 'IPB3', 'IPW2', 'IPW3']) {
for (const wheel of ['W38A', 'W39S']) {
for (const color of ['PPSW', 'PBSB', 'PPSB', 'PN01', 'PR01']) {
for (const chasis of ['MT351', 'MT352']) {
combinations.push([chasis, interior, wheel, color])
}
}
}
}

const photos = optionCodes.flatMap(optionCodes => teslaImages({ modelLetter: 3, optionCodes }))
t.true(await isAllReachable(photos))
t.snapshot(photos)
})
for (const optionCodes of combinations) {
test.serial(`Model 3 Highland (${optionCodes.join(', ')})`, async t => {
const photos = teslaImages({ modelLetter: 3, optionCodes })
t.true(await isAllReachable(photos))
t.snapshot({ optionCodes, photos })
})
}
Loading

0 comments on commit 3df91b6

Please sign in to comment.