Skip to content

Commit

Permalink
Add setup for tasks card
Browse files Browse the repository at this point in the history
  • Loading branch information
uittenbroekrobbert committed Jun 3, 2024
1 parent 4f2a83e commit 9bec10d
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 6 deletions.
1 change: 1 addition & 0 deletions .devcontainer/postCreateCommand.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

pipx install poetry
poetry install
poetry run playwright install --with-deps
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ jobs:
- name: Install dependencies
run: poetry install

- name: Install Playwright browsers
run: poetry run playwright install --with-deps

- name: run ruff
run: poetry run ruff check --output-format=github

Expand Down Expand Up @@ -92,6 +95,9 @@ jobs:
- name: Install dependencies
run: poetry install

- name: Install Playwright browsers
run: poetry run playwright install --with-deps

- name: Run pytest
run: poetry run coverage run -m pytest

Expand Down
12 changes: 8 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,16 @@ filterwarnings = [
level = "PARANOID"
dependencies = true
authorized_licenses = [
"Apache Software",
"Artistic",
"BSD",
"Python Software Foundation",
"GNU General Public License v2 or later (GPLv2+)",
"GNU General Public License (GPL)",
"GNU Library or Lesser General Public License (LGPL)",
"MIT",
"Apache Software",
"GNU Library or Lesser General Public License (LGPL)",
"Mozilla Public License 2.0 (MPL 2.0)",
"The Unlicense (Unlicense)",
"ISC License (ISCL)"
"ISC License (ISCL)",
"Mozilla Public License 2.0 (MPL 2.0)",
"Python Software Foundation"
]
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ sonar.python.version=3.10,3.11,3.12

sonar.python.coverage.reportPaths=coverage.xml

sonar.coverage.exclusions=tad/migrations/**
sonar.coverage.exclusions=tad/migrations/**,tad/site/static/js/tad.js
11 changes: 10 additions & 1 deletion tests/api/routes/test_pages.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
from fastapi.testclient import TestClient

from tests.database_test_utils import DatabaseTestUtils

def test_get_main_page(client: TestClient) -> None:

def test_get_main_page(client: TestClient, db: DatabaseTestUtils) -> None:
db.init(
[
{"table": "status", "id": 1},
{"table": "task", "id": 1, "status_id": 1},
{"table": "task", "id": 2, "status_id": 1},
]
)
response = client.get("/pages/")
assert response.status_code == 200
assert response.headers["content-type"] == "text/html; charset=utf-8"
Expand Down

0 comments on commit 9bec10d

Please sign in to comment.