Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement song folder deletion detection to make the automated test passing #702

Open
dtinth opened this issue Oct 11, 2021 · 2 comments
Open
Assignees

Comments

@dtinth
Copy link
Member

dtinth commented Oct 11, 2021

Background

The recently-announced feature preview, Custom songs folder, is missing the ability to detect deleted songs.

There’s already an automated test for this functionality, but the test is disabled, because the functionality has not been implemented yet.

xit('detects deleted folders', async () => {
const folder: MockFolder = { song1, song2 }
const tester = new CustomFolderTestHarness()
await tester.setFolder(folder)
await tester.scan()
await tester.checkState(async (state) => {
expect(state.songs).to.have.length(2)
})
delete folder['song1']
await tester.scan()
await tester.checkState(async (state) => {
expect(state.songs).to.have.length(1)
})
})

Please help implement this feature, so that when a song for there is deleted, the game can detect it.

Task

  • Enable the test by changing xit to it. The test will fail. See below for how to run the test.

  • Implement folder deletion detection (more details about the functionality below). If it is correctly implemented, the test should be passing.

Learn about this functionality

  1. Download a BMS package an extract it to your computer. For an example BMS package that you can use, try downloading this package, which contains 6 songs: http://9domu46i.com/yuruyuru/phase14.html

  2. Go to https://bemuse.ninja/?mode=playground&playground=custom-folder

  3. Click Set custom songs folder and select the extracted folder.

  4. Click Scan to scan the folder. After it is done you should see: “Number of songs in the database: 6”

  5. Delete one of the song folders and click Scan again. The number should decrease, but right now it doesn’t, because that is no code to detect deletion of the folder yet. Please implement this.

How to test this feature

  1. Run the development server. See README file.

  2. Go to http://localhost:8080/?mode=test&grep=custom-folder to run the tests.

Hacktoberfest

If you would like to work on this task, please write a comment stating your intent. We will then assign the issue to you. To ensure continuity, the issue will be unassigned after 3 days of inactivity — so please keep us updated.

@fResult
Copy link
Contributor

fResult commented Oct 30, 2021

I intend to implement this feature

@dtinth
Copy link
Member Author

dtinth commented Oct 30, 2021

@fResult Yours now, thank you for taking this issue! 🙏

@dtinth dtinth moved this to Done in Bemuse Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants