Claudio Ortolina
84159a1c0d
Improve test coverage
...
Files Created (8 files, 54 new tests)
Fixtures
1. test/support/fixtures/music_library/record_sets.ex — record_set/1
and record_set_with_records/2 helpers
2. test/support/fixtures/music_library/online_store_templates.ex —
online_store_template/1 helper
Context Tests
3. test/music_library/record_sets_test.exs — 20 tests covering search,
count, CRUD, add/remove/move records
4. test/music_library/online_store_templates_test.exs — 8 tests
covering list, CRUD, URL generation, validation
5. test/music_library/search_test.exs — 5 tests covering universal
search and search counts
6. test/music_library/notes_test.exs — 4 tests covering get, create,
update
LiveView Tests
7. test/music_library_web/live/record_set_live/index_test.exs — 11
tests covering listing, empty state, search, ordering,
create/edit/delete sets, remove records, reorder records
8.
test/music_library_web/live/online_store_template_live/index_test.exs —
6 tests covering listing, create/edit/delete, toggle enabled
Results
- 297 tests, 0 failures (up from 243 — 54 new tests added)
- All existing tests continue to pass
There's a remaining gettext warning that needs to be investigated
2026-02-07 10:39:22 +00:00
Claudio Ortolina
faf8500256
Ensure uniqueness of scrobble rules
2026-02-02 10:32:32 +00:00
Claudio Ortolina
9666b24b4a
Standardize button labels
2025-12-14 09:25:41 +03:00
Claudio Ortolina
0df348ae19
Add pagination for scrobble rules
2025-12-14 09:21:13 +03:00
Claudio Ortolina
84e7c06d27
Can edit scrobbled tracks album/artist mbids
2025-12-09 14:38:01 +00:00
Claudio Ortolina
5692be4e63
Update dependencies
...
credo 1.7.13 => 1.7.14 - requires updates to pass updated checks
2025-12-01 16:09:51 +00:00
Claudio Ortolina
71f7a38fee
Don't use streams for records on this day
2025-11-26 18:50:35 +00:00
Copilot
e11894c095
Batch scrobble rule application by type to reduce N queries to 2 ( #61 )
...
* Implement optimized batch rule application
- Add apply_all_album_rules/1 to batch apply all album rules in single query
- Add apply_all_artist_rules/1 to batch apply all artist rules in single query
- Update apply_all_rules/0 to use new batch functions
- Add comprehensive tests for batch application
- Use CASE statement in SQL to apply multiple rules efficiently
Co-authored-by: cloud8421 <537608+cloud8421@users.noreply.github.com >
* Add batch application support for track-filtered rules
- Extend apply_all_album_rules/2 to support filtering by tracks
- Extend apply_all_artist_rules/2 to support filtering by tracks
- Update apply_all_rules/1 to use batch functions for track-filtered application
- Remove duplicate function definitions
- Ensures both main use cases (all tracks and specific tracks) are optimized
Co-authored-by: cloud8421 <537608+cloud8421@users.noreply.github.com >
* Add comprehensive documentation for optimization
- Document the problem and solution approach
- Explain SQL generation and performance impact
- Detail trade-offs and backward compatibility
- Include future considerations and scalability notes
Co-authored-by: cloud8421 <537608+cloud8421@users.noreply.github.com >
* Apply credo suggestions and format
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com >
Co-authored-by: cloud8421 <537608+cloud8421@users.noreply.github.com >
Co-authored-by: Claudio Ortolina <cloud8421@gmail.com >
2025-11-10 20:04:34 +00:00
Claudio Ortolina
997ac40cc5
Fix broken test
2025-11-09 19:22:53 +00:00
copilot-swe-agent[bot]
36d1ba1b48
Fix hook and add keyboard navigation tests
...
Co-authored-by: cloud8421 <537608+cloud8421@users.noreply.github.com >
2025-11-09 19:22:53 +00:00
Claudio Ortolina
11acec56b2
Remove lotus
...
Unstable - and it messes with the repo connection, creating other
errors.
2025-11-03 17:29:37 +00:00
Claudio Ortolina
ed99f6bda8
Implement dense grid as variation of normal grid
2025-11-03 09:49:51 +00:00
Claudio Ortolina
12272608bc
Default collection and wishlist to a grid layout
2025-11-03 09:49:50 +00:00
Claudio Ortolina
f4808c25c2
Update dependencies
...
phoenix_test 0.8.2 => 0.8.3
Includes a test fix due to PhoenixTest having changed the logic used to
match text content in a nested selector.
2025-10-27 15:21:26 +00:00
Claudio Ortolina
e1a1ddd682
Speed up test
...
There are only 20 tracks per page, so 21 tracks are enough
2025-10-26 14:23:14 +00:00
Claudio Ortolina
89db253e59
Refactor test to use PhoenixTest APIs
2025-10-25 13:35:21 +01:00
Claudio Ortolina
4dc80cf739
Make test actually work
2025-10-25 13:18:05 +01:00
Claudio Ortolina
49b5075222
More speed up test
2025-10-25 13:07:35 +01:00
Claudio Ortolina
0b56e01162
Speed up test
...
Entire spec is AI generated and needs to be revised.
2025-10-25 12:59:14 +01:00
Claudio Ortolina
59eb603b3f
Return more record information in the API
2025-10-25 11:52:50 +01:00
Claudio Ortolina
4c65bbddb6
Add prod test for /dev/lotus endpoint protection
2025-10-25 09:23:12 +01:00
Claudio Ortolina
f02564fa30
Add /api/collection/on_this_day endpoint
2025-10-24 20:06:23 +01:00
Claudio Ortolina
7b697827fd
Don't scrobble releases with zero duration
2025-10-23 10:27:08 +01:00
Claudio Ortolina
35aec967fe
Simplify tests using PhoenixTest
2025-10-22 10:52:22 +01:00
Claudio Ortolina
40143df96d
Add tests for universal search
2025-10-22 09:23:54 +01:00
Claudio Ortolina
d38089d82d
Show similarity in % points
2025-10-12 20:46:01 +02:00
Claudio Ortolina
ee199272b1
Use sqlite vector
2025-10-12 13:36:42 +02:00
Claudio Ortolina
14934b25d9
Load the sqlite-vec extension
2025-10-11 21:47:02 +02:00
Claudio Ortolina
9cae972bc5
Add similar records
...
Initial stab by Claude
2025-10-11 21:39:59 +02:00
Claudio Ortolina
d39829c5ca
Add tests for MusicBrainz.ExternalLink
2025-10-08 18:58:45 +02:00
Claudio Ortolina
57dfd3d33d
Remove ErrorTracker
...
Doesn't work with recent LiveView releases, and seems to be maintained
very slowly despite incoming PRs to fix the issues.
2025-10-03 10:15:23 +03:00
Claudio Ortolina
621fe385e3
Show record status markers in scrobbled tracks index
2025-09-29 11:04:35 +03:00
Claudio Ortolina
cc84c3a429
Remove unused functions
2025-09-26 15:26:44 +03:00
Claudio Ortolina
90b3fa1fdc
Refactor Records.Cover to Assets.Image
2025-09-20 07:42:38 +03:00
Claudio Ortolina
e158345674
Change /covers to /assets
2025-09-18 21:26:16 +03:00
Claudio Ortolina
aa72692eaf
Cache transformations
2025-09-17 16:54:47 +03:00
Claudio Ortolina
b0f4e18ef7
Fix API collection record cover URLs
2025-09-17 11:24:14 +03:00
Claudio Ortolina
0996b78c7b
Use Transforms to serve covers at the right size
2025-09-17 10:26:38 +03:00
Claudio Ortolina
dc9c8fca8e
Add Asset.Transform module
...
Allows building URLs with embedded transformation options
2025-09-17 09:33:13 +03:00
Claudio Ortolina
d932498c11
Rename tests for consistency
2025-09-17 09:12:07 +03:00
Claudio Ortolina
e7c2b92a3b
Remove track count from scrobbled tracks list
2025-09-17 09:11:03 +03:00
Claudio Ortolina
f42f050de0
Simplify scrobbled tracks layout
...
Remove no results view
2025-09-16 21:01:44 +03:00
Claudio Ortolina
a0647ab91a
Remove buggy tests
2025-09-16 13:15:23 +03:00
Claudio Ortolina
eec097dd43
Address warnings
2025-09-16 13:15:16 +03:00
Claudio Ortolina
a265f2ae52
Address Credo warnings
2025-09-16 12:57:03 +03:00
Claudio Ortolina
dae334b1b7
Scrobbled tracks CRUD
...
- Failing tests
- Warnings
2025-09-16 12:45:36 +03:00
Claudio Ortolina
6c98b164eb
Update more MusicBrainz fixtures
2025-09-15 14:31:55 +03:00
Claudio Ortolina
b2283a3e5e
Fix fixture path
2025-09-15 14:20:43 +03:00
Claudio Ortolina
2ef4eb2d2e
Refresh fixtures
2025-09-15 14:02:53 +03:00
Claudio Ortolina
1b89f244f8
Change test to avoid timing-related failures
...
When inserting twice, the second insertion is a no-op, due to the fact
that we use `on_conflict: :nothing` in the `Repo.insert/2` call.
This means that for fields generated client side like timestamps we
don't get the stored values, but the client side values (which haven't
been persisted).
In case of the test crossing the second boundary, the second asset would
be different because of the timestamps, and the test would fail.
This test is better. It tests that no matter how many times we insert
the same thing we always have one stored.
2025-09-15 07:42:03 +03:00