Replies: 4 comments
-
I've just added a few tests to flesh out the artist usage aggregation: 72dae21 |
Beta Was this translation helpful? Give feedback.
-
Uploading your real Bandcamp statement shows the following breakdown. First screenshot is the summarised artists, second screenshot is opening one table. |
Beta Was this translation helpful? Give feedback.
-
It looks to be working nicely, but I've broken the existing Behat tests, because the page structure is completely different now, even for single artists. Before I finish this development session, I'm going to revisit the functionality where only one artist is detected, then hide the artist name, and automatically open the table view (then fix the broken tests). |
Beta Was this translation helpful? Give feedback.
-
Here's the CSV used (a fake Bandcamp file):
Here's the new Behat test that's now passing with the above file: Feature: App should aggregate multiple artists
In order to view earnings for multiple artists
As a label user
I should be able to upload statements containing multiple artists
Scenario: I upload a Bandcamp statement containing multiple artists
Given I am on the homepage
When I attach the file "bandcamp-simple-multiple-artist.csv" to "statement"
And I press "Upload"
Then I should see 2 artists
And I should see the total earnings for "Person 1" as "£17.68"
And I should see the total earnings for "Person 2" as "£16.28"
And I should see the following table data for "Person 1":
| Work title | Amount |
| BC 1 | £10.85 |
| BC 3 | £4.45 |
| BC 2 | £2.38 |
And I should see the following table data for "Person 2":
| Work title | Amount |
| BC 4 | £8.51 |
| BC 5 | £7.77 | This functionality was just pushed and will deploy automatically to https://multiple-artists.dev.trackshift.app/ Please take a look at the above fake CSV and compare it to my expectations in the Behat script, to double check it adds up to what you expect (and play around in the app yourself too!) Have fun and speak soon! |
Beta Was this translation helpful? Give feedback.
-
A recap of what was added the other day:
Artist
class was introducedUpload
had understanding of whether or not it contained more than one artistWhat still needs to be done:
Statement
needs to look at all theUpload
s it contains to understand whether the entire statement of account is for one artist or multipleI think the way that I want to achieve this extra HTML is by updating the current HTML to always show the artist grouping, and hide the artist name if there's only one artist. That way, we don't have to manage two different table views.
To keep things simple, I'll create a new class
ArtistAggregation
to surround theAggregation
class. After the tests pass, it'll be worth refactoring things knowing what we know now... but with the tests passing this will be so much more pleasant than stabbing around in the dark.Beta Was this translation helpful? Give feedback.
All reactions