Skip to content

Commit

Permalink
Merge branch 'main' into test/add-landing-header-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aasimsyed committed May 5, 2024
2 parents ba6bed8 + ab9418c commit 856f2bb
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 51 deletions.
44 changes: 8 additions & 36 deletions .github/workflows/pr_ci_playwright_e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@ jobs:
runs-on: ubuntu-latest
environment: dev

services:
postgres:
image: postgres:15
env:
POSTGRES_DB: ${{ secrets.DATABASE_NAME }}
POSTGRES_USER: ${{ secrets.DATABASE_USER }}
POSTGRES_PASSWORD: ${{ secrets.DATABASE_PASSWORD }}
ports:
- 5432:5432

steps:
- name: cleanup old checkout
run: chmod +w -R ${GITHUB_WORKSPACE}; rm -rf ${GITHUB_WORKSPACE}/*;
Expand All @@ -32,36 +22,22 @@ jobs:
- name: Check Port Availability
run: |
! nc -z localhost ${{ secrets.FRONTEND_PORT }} && \
! nc -z localhost ${{ secrets.BACKEND_PORT }} && \
! nc -z localhost 3000 && \
! nc -z localhost 8000 && \
! nc -z localhost 5432
- name: Set up Docker Compose
run: |
echo "FRONTEND_PORT=${{ secrets.FRONTEND_PORT }}" >> .env
echo "BACKEND_PORT=${{ secrets.BACKEND_PORT }}" >> .env
echo "DATABASE_PORT=${{ secrets.DATABASE_PORT }}" >> .env
echo "DATABASE_HOST=postgres" >> .env # Using the service name from the services section
echo "DATABASE_NAME=${{ secrets.DATABASE_NAME }}" >> .env
echo "DATABASE_USER=${{ secrets.DATABASE_USER }}" >> .env
echo "DATABASE_PASSWORD=${{ secrets.DATABASE_PASSWORD }}" >> .env
echo "DJANGO_ALLOWED_HOSTS=${{ secrets.DJANGO_ALLOWED_HOSTS }}" >> .env
echo "DEBUG=${{ secrets.DEBUG }}" >> .env
echo "SECRET_KEY=${{ secrets.SECRET_KEY }}" >> .env
- name: Run Docker Compose
run: docker-compose -f docker-compose.yml up --build -d
run: docker compose --env-file .env.dev up --build -d

- name: Setup Node environment
uses: actions/setup-node@v4
with:
node-version: 20

#- name: Install dependencies via Yarn
#uses: borales/actions-yarn@v5
#with:
#cmd: install --immutable --force --frozen-lockfile
#dir: "frontend"
- name: Clean Yarn cache
working-directory: ./frontend
run: |
sudo yarn cache clean
- name: Install dependencies via Yarn
working-directory: ./frontend
Expand All @@ -76,7 +52,7 @@ jobs:
- name: Wait for web server to be ready
working-directory: ./frontend
run: |
curl --retry 15 --retry-delay 5 --retry-all-errors http://localhost:${{ secrets.FRONTEND_PORT }}
yarn wait-on http://localhost:3000
- name: Run Playwright tests
working-directory: ./frontend
Expand All @@ -90,7 +66,3 @@ jobs:
name: playwright-report
path: frontend/playwright-report/
retention-days: 30

- name: Shutdown Docker Compose
if: always()
run: docker-compose down
8 changes: 3 additions & 5 deletions frontend/layouts/sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,10 @@ const handleWindowSizeChange = () => {
const sidebarContentScrollable = useState<boolean>("sidebarContentScrollable");
const sidebarFooterDynamicClass = getSidebarFooterDynamicClass(
sidebarHover.value
);
const sidebarContentDynamicClass = getSidebarContentDynamicClass(
sidebarContentScrollable.value,
sidebarHover.value
sidebarHover
);
const sidebarFooterDynamicClass = getSidebarFooterDynamicClass(sidebarHover);
</script>
2 changes: 2 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"@maplibre/maplibre-gl-directions": "^0.7.0",
"@nuxtjs/axios": "^5.13.6",
"@nuxtjs/plausible": "^1.0.0",
"@opentelemetry/api": ">=1.0.0 <1.9.0",
"@popperjs/core": "^2.11.8",
"@somushq/vue3-friendly-captcha": "^1.0.2",
"@types/geojson": "^7946.0.14",
Expand All @@ -71,6 +72,7 @@
"v-calendar": "^3.1.1",
"vue-socials": "^2.0.5",
"vuedraggable": "~4.1.0",
"wait-on": "^7.2.0",
"zxcvbn": "^4.4.2"
}
}
8 changes: 4 additions & 4 deletions frontend/utils/sidebarUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const sidebar = useSidebar();

export function getSidebarContentDynamicClass(
sidebarContentScrollable: boolean,
sidebarHover: boolean
sidebarHover: Ref<boolean>
) {
return computed(() => ({
"md:pl-16 xl:pl-56":
Expand All @@ -19,11 +19,11 @@ export function getSidebarContentDynamicClass(
"blur-sm xl:blur-none":
sidebar.collapsedSwitch == true &&
sidebar.collapsed == false &&
sidebarHover == true,
sidebarHover.value == true,
}));
}

export function getSidebarFooterDynamicClass(sidebarHover: boolean) {
export function getSidebarFooterDynamicClass(sidebarHover: Ref<boolean>) {
return computed(() => ({
"md:pl-24 xl:pl-64":
sidebar.collapsed == false || sidebar.collapsedSwitch == false,
Expand All @@ -32,6 +32,6 @@ export function getSidebarFooterDynamicClass(sidebarHover: boolean) {
"blur-sm xl:blur-none":
sidebar.collapsedSwitch == true &&
sidebar.collapsed == false &&
sidebarHover == true,
sidebarHover.value == true,
}));
}
95 changes: 89 additions & 6 deletions frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,18 @@
resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.2.tgz#d8bae93ac8b815b2bd7a98078cf91e2724ef11e5"
integrity sha512-J4yDIIthosAsRZ5CPYP/jQvUAQtlZTTD/4suA08/FEnlxqW3sKS9iAhgsa9VYLZ6vDHn/ixJgIqRQPotoBjxIw==

"@hapi/hoek@^9.0.0", "@hapi/hoek@^9.3.0":
version "9.3.0"
resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb"
integrity sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==

"@hapi/topo@^5.1.0":
version "5.1.0"
resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-5.1.0.tgz#dc448e332c6c6e37a4dc02fd84ba8d44b9afb012"
integrity sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==
dependencies:
"@hapi/hoek" "^9.0.0"

"@headlessui/vue@^1.7.19":
version "1.7.21"
resolved "https://registry.yarnpkg.com/@headlessui/vue/-/vue-1.7.21.tgz#debad090e6ae191f50cadde54d0b53322983ac6c"
Expand Down Expand Up @@ -1457,7 +1469,7 @@
dependencies:
"@opentelemetry/api" "^1.0.0"

"@opentelemetry/api@^1.0.0":
"@opentelemetry/api@>=1.0.0 <1.9.0", "@opentelemetry/api@^1.0.0":
version "1.8.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.8.0.tgz#5aa7abb48f23f693068ed2999ae627d2f7d902ec"
integrity sha512-I/s6F7yKUDdtMsoBWXJe8Qz40Tui5vsuKCWJEWVL+5q9sSWRzzx6v2KeNsOBEwd94j0eWkpWCH4yB6rZg9Mf0w==
Expand Down Expand Up @@ -1870,6 +1882,23 @@
dependencies:
shiki "1.4.0"

"@sideway/address@^4.1.5":
version "4.1.5"
resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.5.tgz#4bc149a0076623ced99ca8208ba780d65a99b9d5"
integrity sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==
dependencies:
"@hapi/hoek" "^9.0.0"

"@sideway/formula@^3.0.1":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.1.tgz#80fcbcbaf7ce031e0ef2dd29b1bfc7c3f583611f"
integrity sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==

"@sideway/pinpoint@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df"
integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==

"@sigstore/bundle@^2.3.0", "@sigstore/bundle@^2.3.1":
version "2.3.1"
resolved "https://registry.yarnpkg.com/@sigstore/bundle/-/bundle-2.3.1.tgz#f6cdc67c8400e58ca27f0ef495b27a9327512073"
Expand Down Expand Up @@ -3158,7 +3187,7 @@ axios@^0.21.1:
dependencies:
follow-redirects "^1.14.0"

axios@^1.6.8:
axios@^1.6.1, axios@^1.6.8:
version "1.6.8"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.8.tgz#66d294951f5d988a00e87a0ffb955316a619ea66"
integrity sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==
Expand Down Expand Up @@ -5874,6 +5903,17 @@ jiti@^1.21.0:
resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.0.tgz#7c97f8fe045724e136a397f7340475244156105d"
integrity sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==

joi@^17.11.0:
version "17.13.1"
resolved "https://registry.yarnpkg.com/joi/-/joi-17.13.1.tgz#9c7b53dc3b44dd9ae200255cc3b398874918a6ca"
integrity sha512-vaBlIKCyo4FCUtCm7Eu4QZd/q02bWcxfUO6YSXAZOWF6gzcLBeba8kwotUdYJjDLW8Cz8RywsSOqiNJZW0mNvg==
dependencies:
"@hapi/hoek" "^9.3.0"
"@hapi/topo" "^5.1.0"
"@sideway/address" "^4.1.5"
"@sideway/formula" "^3.0.1"
"@sideway/pinpoint" "^2.0.0"

js-tokens@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
Expand Down Expand Up @@ -8658,6 +8698,13 @@ rw@^1.3.3:
resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4"
integrity sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==

rxjs@^7.8.1:
version "7.8.1"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543"
integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==
dependencies:
tslib "^2.1.0"

[email protected], safe-buffer@^5.1.0, safe-buffer@~5.2.0:
version "5.2.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
Expand Down Expand Up @@ -9086,7 +9133,16 @@ strict-event-emitter@^0.5.1:
resolved "https://registry.yarnpkg.com/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz#1602ece81c51574ca39c6815e09f1a3e8550bd93"
integrity sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==

"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand Down Expand Up @@ -9126,7 +9182,14 @@ stringify-entities@^4.0.3:
character-entities-html4 "^2.0.0"
character-entities-legacy "^3.0.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand Down Expand Up @@ -9430,7 +9493,7 @@ ts-interface-checker@^0.1.9:
resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699"
integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==

tslib@^2.6.2:
tslib@^2.1.0, tslib@^2.6.2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae"
integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==
Expand Down Expand Up @@ -10142,6 +10205,17 @@ vuedraggable@~4.1.0:
dependencies:
sortablejs "1.14.0"

wait-on@^7.2.0:
version "7.2.0"
resolved "https://registry.yarnpkg.com/wait-on/-/wait-on-7.2.0.tgz#d76b20ed3fc1e2bebc051fae5c1ff93be7892928"
integrity sha512-wCQcHkRazgjG5XoAq9jbTMLpNIjoSlZslrJ2+N9MxDsGEv1HnFoVjOCexL0ESva7Y9cu350j+DWADdk54s4AFQ==
dependencies:
axios "^1.6.1"
joi "^17.11.0"
lodash "^4.17.21"
minimist "^1.2.8"
rxjs "^7.8.1"

web-namespaces@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/web-namespaces/-/web-namespaces-2.0.1.tgz#1010ff7c650eccb2592cebeeaf9a1b253fd40692"
Expand Down Expand Up @@ -10220,7 +10294,7 @@ word-wrap@^1.2.5:
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34"
integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand All @@ -10238,6 +10312,15 @@ wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
Expand Down

0 comments on commit 856f2bb

Please sign in to comment.