diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fb7fbdb9..14a2f8d1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,7 +13,7 @@ jobs: - uses: supabase/setup-cli@v1 with: - version: latest + version: 1.106.1 - name: Start Supabase local development setup run: supabase start @@ -25,4 +25,4 @@ jobs: echo "Detected uncommitted changes after build. See status below:" git diff exit 1 - fi \ No newline at end of file + fi diff --git a/.gitignore b/.gitignore index 88ae74a7..617e1766 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,8 @@ pnpm-debug.log* .DS_Store # Pages created by i18n-astro-aut integration -astro_tmp_pages_* \ No newline at end of file +astro_tmp_pages_* +/test-results/ +/playwright-report/ +/blob-report/ +/playwright/.cache/ diff --git a/package-lock.json b/package-lock.json index 99332f5f..2fcdaea4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,9 +38,11 @@ }, "devDependencies": { "@iconify-json/tabler": "^1.1.87", + "@playwright/test": "^1.40.1", "@tailwindcss/typography": "^0.5.10", "@types/intl-tel-input": "^18.1.1", "@types/jquery": "^3.5.16", + "@types/node": "^20.10.5", "@types/react": "^18.2.14", "@types/react-dom": "^18.2.7", "@vite-pwa/astro": "^0.1.3", @@ -48,6 +50,7 @@ "prettier-plugin-astro": "^0.11.0", "prettier-plugin-tailwindcss": "^0.5.3", "supabase": "^1.110.1", + "tailwind-scrollbar": "^3.0.5", "vite-plugin-pwa": "^0.16.5", "workbox-cli": "^7.0.0", "workbox-routing": "^7.0.0", @@ -2950,6 +2953,21 @@ "node": ">= 8" } }, + "node_modules/@playwright/test": { + "version": "1.40.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.40.1.tgz", + "integrity": "sha512-EaaawMTOeEItCRvfmkI9v6rBkF1svM8wjl/YPRrg2N2Wmp+4qJYkWtJsbew1szfKKDm6fPLy4YAanBhIlf9dWw==", + "dev": true, + "dependencies": { + "playwright": "1.40.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=16" + } + }, "node_modules/@sindresorhus/is": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", @@ -3236,17 +3254,17 @@ } }, "node_modules/@types/node": { - "version": "20.9.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.0.tgz", - "integrity": "sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==", + "version": "20.10.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.5.tgz", + "integrity": "sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==", "dependencies": { "undici-types": "~5.26.4" } }, "node_modules/@types/node-forge": { - "version": "1.3.9", - "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.9.tgz", - "integrity": "sha512-meK88cx/sTalPSLSoCzkiUB4VPIFHmxtXm5FaaqRDqBX2i/Sy8bJ4odsan0b20RBjPh06dAQ+OTTdnyQyhJZyQ==", + "version": "1.3.11", + "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.11.tgz", + "integrity": "sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==", "dev": true, "dependencies": { "@types/node": "*" @@ -10812,6 +10830,50 @@ "node": ">=8" } }, + "node_modules/playwright": { + "version": "1.40.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.40.1.tgz", + "integrity": "sha512-2eHI7IioIpQ0bS1Ovg/HszsN/XKNwEG1kbzSDDmADpclKc7CyqkHw7Mg2JCz/bbCxg25QUPcjksoMW7JcIFQmw==", + "dev": true, + "dependencies": { + "playwright-core": "1.40.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=16" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "node_modules/playwright-core": { + "version": "1.40.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.40.1.tgz", + "integrity": "sha512-+hkOycxPiV534c4HhpfX6yrlawqVUzITRKwHAmYfmsVreltEl6fAZJ3DPfLMOODw0H3s1Itd6MDCWmP1fl/QvQ==", + "dev": true, + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/playwright/node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/postcss": { "version": "8.4.31", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", @@ -13428,6 +13490,18 @@ "node": ">= 10" } }, + "node_modules/tailwind-scrollbar": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/tailwind-scrollbar/-/tailwind-scrollbar-3.0.5.tgz", + "integrity": "sha512-0ZwxTivevqq9BY9fRP9zDjHl7Tu+J5giBGbln+0O1R/7nHtBUKnjQcA1aTIhK7Oyjp6Uc/Dj6/dn8Dq58k5Uww==", + "dev": true, + "engines": { + "node": ">=12.13.0" + }, + "peerDependencies": { + "tailwindcss": "3.x" + } + }, "node_modules/tailwindcss": { "version": "3.3.5", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.5.tgz", diff --git a/package.json b/package.json index 6aedb71b..7cb3381c 100644 --- a/package.json +++ b/package.json @@ -40,9 +40,11 @@ }, "devDependencies": { "@iconify-json/tabler": "^1.1.87", + "@playwright/test": "^1.40.1", "@tailwindcss/typography": "^0.5.10", "@types/intl-tel-input": "^18.1.1", "@types/jquery": "^3.5.16", + "@types/node": "^20.10.5", "@types/react": "^18.2.14", "@types/react-dom": "^18.2.7", "@vite-pwa/astro": "^0.1.3", @@ -50,6 +52,7 @@ "prettier-plugin-astro": "^0.11.0", "prettier-plugin-tailwindcss": "^0.5.3", "supabase": "^1.110.1", + "tailwind-scrollbar": "^3.0.5", "vite-plugin-pwa": "^0.16.5", "workbox-cli": "^7.0.0", "workbox-routing": "^7.0.0", diff --git a/playwright.config.ts b/playwright.config.ts new file mode 100644 index 00000000..e3442126 --- /dev/null +++ b/playwright.config.ts @@ -0,0 +1,77 @@ +import { defineConfig, devices } from '@playwright/test'; + +/** + * Read environment variables from file. + * https://github.com/motdotla/dotenv + */ +// require('dotenv').config(); + +/** + * See https://playwright.dev/docs/test-configuration. + */ +export default defineConfig({ + testDir: './test', + /* Run tests in files in parallel */ + fullyParallel: true, + /* Fail the build on CI if you accidentally left test.only in the source code. */ + forbidOnly: !!process.env.CI, + /* Retry on CI only */ + retries: process.env.CI ? 2 : 0, + /* Opt out of parallel tests on CI. */ + workers: process.env.CI ? 1 : undefined, + /* Reporter to use. See https://playwright.dev/docs/test-reporters */ + reporter: 'html', + /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ + use: { + /* Base URL to use in actions like `await page.goto('/')`. */ + // baseURL: 'http://127.0.0.1:3000', + + /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ + trace: 'on-first-retry', + }, + + /* Configure projects for major browsers */ + projects: [ + { + name: 'chromium', + use: { ...devices['Desktop Chrome'] }, + }, + + { + name: 'firefox', + use: { ...devices['Desktop Firefox'] }, + }, + + { + name: 'webkit', + use: { ...devices['Desktop Safari'] }, + }, + + /* Test against mobile viewports. */ + // { + // name: 'Mobile Chrome', + // use: { ...devices['Pixel 5'] }, + // }, + // { + // name: 'Mobile Safari', + // use: { ...devices['iPhone 12'] }, + // }, + + /* Test against branded browsers. */ + // { + // name: 'Microsoft Edge', + // use: { ...devices['Desktop Edge'], channel: 'msedge' }, + // }, + // { + // name: 'Google Chrome', + // use: { ...devices['Desktop Chrome'], channel: 'chrome' }, + // }, + ], + + /* Run your local dev server before starting the tests */ + // webServer: { + // command: 'npm run start', + // url: 'http://127.0.0.1:3000', + // reuseExistingServer: !process.env.CI, + // }, +}); diff --git a/src/assets/categoryIcons/circled-left-arrow.svg b/src/assets/categoryIcons/circled-left-arrow.svg index 57c104b1..62873569 100644 --- a/src/assets/categoryIcons/circled-left-arrow.svg +++ b/src/assets/categoryIcons/circled-left-arrow.svg @@ -1,4 +1,4 @@ - - + + \ No newline at end of file diff --git a/src/assets/categoryIcons/education.svg b/src/assets/categoryIcons/education.svg new file mode 100644 index 00000000..83447352 --- /dev/null +++ b/src/assets/categoryIcons/education.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/assets/categoryIcons/home.svg b/src/assets/categoryIcons/home.svg new file mode 100644 index 00000000..fc8cbb7f --- /dev/null +++ b/src/assets/categoryIcons/home.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/assets/categoryIcons/plate.svg b/src/assets/categoryIcons/plate.svg new file mode 100644 index 00000000..e5f745ed --- /dev/null +++ b/src/assets/categoryIcons/plate.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/assets/categoryIcons/virtual.svg b/src/assets/categoryIcons/virtual.svg new file mode 100644 index 00000000..0d2c5ff9 --- /dev/null +++ b/src/assets/categoryIcons/virtual.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/components/common/Footer.astro b/src/components/common/Footer.astro index 2dccb83c..30525fc7 100644 --- a/src/components/common/Footer.astro +++ b/src/components/common/Footer.astro @@ -27,79 +27,81 @@ export interface Props { const { socialLinks = [], secondaryLinks = [], links = [], footNote = ''} = Astro.props; --- -
+ \ No newline at end of file diff --git a/src/components/common/ProfileBtn.tsx b/src/components/common/ProfileBtn.tsx index e713512c..40dcebaf 100644 --- a/src/components/common/ProfileBtn.tsx +++ b/src/components/common/ProfileBtn.tsx @@ -64,10 +64,15 @@ export const ProfileBtn = () => {