From e05a09d2a7f6bcbe37134beeecc75848d1f7322d Mon Sep 17 00:00:00 2001 From: Shahar Talmi Date: Sat, 9 Dec 2023 17:07:26 +0200 Subject: [PATCH] use playwright as library --- package.json | 2 +- playwright.config.ts | 12 -- src/2023/index.html | 14 +- src/2023/leaderboard.html | 343 ++++++++++++++++++++++--------- src/static/solver-screenshot.png | Bin 61913 -> 61916 bytes src/utils/solver.js | 22 +- tests/screenshot.spec.ts | 20 -- 7 files changed, 274 insertions(+), 139 deletions(-) delete mode 100644 playwright.config.ts delete mode 100644 tests/screenshot.spec.ts diff --git a/package.json b/package.json index 4f9bcd85..9d11f1d7 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "start": "node src/index.js", "serve": "open https://127.0.0.1/ && http-server -p 443 -P https://127.0.0.1/ -S", "test": "f(){ if [ -z \"$CI\" ]; then jest --onlyChanged $*; else jest $*; fi }; NODE_OPTIONS=--experimental-vm-modules f", - "lint": "eslint src && tsc && playwright test", + "lint": "eslint src && tsc", "prepare": "husky install" }, "dependencies": { diff --git a/playwright.config.ts b/playwright.config.ts deleted file mode 100644 index 3d390716..00000000 --- a/playwright.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { defineConfig, devices } from '@playwright/test'; - -export default defineConfig({ - testDir: './tests', - reporter: 'html', - projects: [ - { - name: 'chromium', - use: { ...devices['Desktop Chrome'] }, - }, - ], -}); diff --git a/src/2023/index.html b/src/2023/index.html index 2f3d18f5..5ddcda3a 100644 --- a/src/2023/index.html +++ b/src/2023/index.html @@ -31,15 +31,15 @@

   $year=<

 
@@ -53,7 +53,7 @@ 

   $year=< (function(){ var countdown = document.getElementById("calendar-countdown"); if (!countdown) return; -var server_eta = 84026; +var server_eta = 50046; var key = "2023-10-"+server_eta; var now = Math.floor(new Date().getTime()/1000); var target = server_eta + now; diff --git a/src/2023/leaderboard.html b/src/2023/leaderboard.html index a785888a..eb6fbf0b 100644 --- a/src/2023/leaderboard.html +++ b/src/2023/leaderboard.html @@ -37,7 +37,7 @@

   $year=<