Age | Commit message (Collapse) | Author |
|
|
|
This looks better than having the header line and the sort button below
each other.
|
|
|
|
|
|
See https://github.com/mozilla/bleach/issues/698
nh3 is a small wrapper around https://crates.io/crates/ammonia - more
Rust code in Fietsboek! \o/
The default seems to be to strip unknown tags instead of replace them
with htmlentities, which is fine. Then the <script> tags are completely
gone.
|
|
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).
|
|
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).
|
|
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.
|
|
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.
|
|
|
|
Getting ready for SQLAlchemy 2.0!
|
|
|
|
|
|
|
|
|
|
This is code that needs to be repeated in possibly several places
(website, API, tests), so it makes sense to have those "high level
actions" a bit abstracted. edit.edit_images was already doing that to a
certain degree, but the code shouldn't have stayed in the view.
|
|
|
|
|
|
To add more playwright tests and to cut down on the duplicated code, the
helper methods have been put into a small class. This way, we don't have
to add 100 pytest fixtures.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Now that the filtering is done via SQL, it is not enough for the user
and the objects to be in the session - they need to be in the database,
similar to the added tracks.
Note that it was not entirely necessary in this case, since the tracks
are public, but it provides the proper functionality in the future.
|
|
|
|
|
|
|
|
|
|
|
|
It turns out that the mt:TourStartTime is also given in UTC, and
therefore cannot be used to get the timezone offset. The problem was
that my local computer's timezone was the same as the tour timezone, so
by the magic of Python's datetime.datetime.fromtimestamp (and the date
CLI util), I did not notice that the timestamp actually represents UTC.
Sadly, it currently looks like there is no way to extract the time zone
from a MyTourbook export.
|
|
|
|
|
|
|
|
|
|
|