Skip to content

Commit 8af9a94

Browse files
evildmpdwilding
andauthored
More frontend fixes (#57)
* Fixed a permissions issue * Bumped version * Add more reload delays, fix another permissions bug * Fixed status algorithm (again) * Added date picker for last review date * Added URL field, improved basic view * Added back tests for logged-in user * Updated CSS for candidate/na statuses * Reformatted with Black * Added basic permission testing * Removed unnecessary formset from template * Bumped version * install playright before running tests * add CI for running tests * fix testing deps * Improved frontend tests Now loads initial_data.yaml that includes built-in superuser and driver users. * Update dashboard/projects/templates/projects/partial_project_basics.html Co-authored-by: Dave Wilding <tech@dpw.me> * sleep in toggle test (temp workaround) --------- Co-authored-by: David Wilding <david.wilding@canonical.com>
1 parent 0006e8f commit 8af9a94

18 files changed

+341
-747
lines changed

.github/workflows/tests.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
app-tests:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v5
14+
- name: Run tests
15+
run: |
16+
cd dashboard
17+
make test

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ The application will run in a Kubernetes cluster, so we need a container image f
8686
Creating the container image might take several minutes, so this is a good point to take a break. When you return, you should see the following output:
8787

8888
> ```
89-
> Packed dashboard_0.23_amd64.rock
89+
> Packed dashboard_0.24_amd64.rock
9090
> ```
9191
9292
### Create a charm
@@ -109,10 +109,10 @@ Creating the charm might take several minutes, so this is another good point to
109109
``` { name=deploy-dashboard }
110110
cd ~/dashboard
111111
rockcraft.skopeo --insecure-policy copy --dest-tls-verify=false \
112-
oci-archive:dashboard_0.23_amd64.rock \
113-
docker://localhost:32000/dashboard:0.23
112+
oci-archive:dashboard_0.24_amd64.rock \
113+
docker://localhost:32000/dashboard:0.24
114114
juju deploy ./charm/dashboard_ubuntu-22.04-amd64.charm \
115-
--resource django-app-image=localhost:32000/dashboard:0.23
115+
--resource django-app-image=localhost:32000/dashboard:0.24
116116
```
117117
118118
The `rockcraft.skopeo` command makes the container image available to Juju.

dashboard/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ run: init
3434

3535
test: install
3636
$(PIP) install -r requirements-dev.txt
37+
$(VENV)/bin/python -m playwright install
3738
$(PYTEST)
3839

3940
clean:

dashboard/dashboard/static/base-styles.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
body {font-family: Helvetica, sans-serif; font-size: 12px;}
22

3+
div.auth a {
4+
border-radius: 999em;
5+
background: orange;
6+
padding: 10px;
7+
border: 1px solid black;
8+
text-decoration: none;
9+
font-weight: bold;
10+
color: black;
11+
display: inline-block;
12+
}
13+
14+
div.auth {margin-bottom: 1em;}
15+
316
/* general table styles */
417

518
th {text-align: left;}

0 commit comments

Comments
 (0)