Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
I'm not too happy with the longest/shortest time/duration words (neither
in English nor in German), but those will do for now until we can think
of better ones.
|
|
Python seems to do fine, but pylint complains (probably rightfully,
since the tests do not represent packages). We lose type hinting for the
playwright_helper, but there's probably a better way to do it in the
future.
|
|
They caused issues because they might not have created the database
tables or the data directory. Since the cleanup job runs globally after
every test, it should take that into consideration and not error out.
|
|
I'd like to have more, but this is a start (and already caught some
errors, see the last two commits).
|
|
Now that round_to_seconds can actually return 0, we need to catch this
case.
|
|
It was ovious that this is broken when you try to round "0s" to
second-level granularity, and you end up with "1s". The problem comes
from the fact that we use the integer divison when checking whether we
should round up or down, but then also use strict inequality.
To fix this, we now also round down if the second_offset is equal to the
halfway point (which in the case of second-level granularity is 0).
|
|
Otherwise everyone can just access any profile.
|
|
We copied the factory method from Track, but forgot to change some of
the words. Now the code fits better with what the function is doing.
As a bonus, pylint no longer complains about a duplicate method.
|
|
We basically do the same hacky trick in two different places, so maybe
we should put it into a separate function, test it, and if a better
implementation arises, swap it.
|
|
|
|
Otherwise it'll show progress bars.
|
|
|
|
|
|
This would otherwise happen if e.g. the user has the page open, the
SQLite file is deleted, the user then activates the overlay layer, and
the sqlite3.connect() creates the database.
|
|
|
|
|
|
|
|
|
|
The reason for that is that we want to add "longest track"/"shortest
track" soon, and the profile() function is getting a bit long
|
|
This makes it a bit easier to generate heatmaps, but at the moment, it
only works manually.
The "long-term" goal is to have fietscron generate heatmaps on a regular
basis.
|
|
With the previous logic, we only counted those that the user themselves
uploaded.
|
|
|
|
|
|
Otherwise it does look very empty when you open the page.
|
|
|
|
So far, fietsboek does not generate them, but if you happen (by
accident) to have hittekaart output a heatmap to the right location, the
profile page will now show it.
|
|
|
|
This is not really a profile page, but rather a page to change your
personal data, so it should be named accordingly (in preparation for
real profiles).
Additionally, we use POST requests to deal with the data change.
|
|
Turns out you need to supply an actual empty array.
While we're playing with the CI configuration, we also move the
deprecated global image/cache/before_script sections into the "default"
section.
|
|
|
|
|
|
Yay, types! (And a lot of escape hatches)
|
|
This makes it consistent with the other scripts (fietsupdate,
fietscron), and makes the argument parsing setup a bit nicer to read.
|
|
|
|
|
|
I'm not the biggest fan of combining many package managers, but the
JavaScript libraries (Bootstrap, Bootstrap-Icons, later the @types
modules and Leaflet) are easy to get via npm, so maybe we can use that
to our advantage and have npm at least download them.
|
|
|
|
|
|
|
|
|
|
Currently, the test seems flaky on CI due to
playwright._impl._api_types.Error: Clicking the checkbox did not
change its state
Maybe this is the change that will fix it?
|
|
This gets the intent across clearer
|
|
|
|
|
|
|
|
|
|
While it shouldn't change the outcome of the test, it might make the
test less flaky, as the expect call will wait until the page is loaded -
which also indicates that the data is updated. Without this, the test
depends on the backend being "fast enough" with applying the
transformation.
|