launcher icon indicating copy to clipboard operation
launcher copied to clipboard

Child curations - backend.

Open LindirQuenya opened this issue 2 years ago • 6 comments

The backend changes for #245.

~~Also, switch to better-sqlite3: performance was suffering without it, and I can't see a reason to stick with a slower version of the same functionality.~~ Nope, better-sqlite3 doesn't do migrations correctly. It's been reverted.

For the testing: I've begun with rewriting the tests for GameManager.ts. I'm not too clear on how to test things beyond that... we'll see.

LindirQuenya avatar Apr 01 '22 00:04 LindirQuenya

Pull Request Test Coverage Report for Build 2234249069

  • 49 of 134 (36.57%) changed or added relevant lines in 9 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-21.3%) to 38.855%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/back/GameLauncher.ts 2 8 25.0%
src/back/util/misc.ts 1 12 8.33%
src/shared/curate/metaToMeta.ts 1 13 7.69%
src/back/importGame.ts 3 30 10.0%
src/back/game/GameManager.ts 21 50 42.0%
<!-- Total: 49 134
Totals Coverage Status
Change from base Build 2011998412: -21.3%
Covered Lines: 1201
Relevant Lines: 2730

💛 - Coveralls

coveralls avatar Apr 01 '22 00:04 coveralls

Things I currently know that I need to fix:

  • [x] Native overrides in execs.json don't seem to work with children.
  • [x] Extras need to be fixed.
  • [x] A whole bunch of strings need to be added.
  • [ ] All backend tests need to be rewritten.
  • [x] ESLint messages should be addressed.
  • [x] Curation needs to be tested.
  • [x] Importing needs to be tested.
  • [x] The game counter at the bottom needs fixing.
  • [x] The game data browser is broken?

LindirQuenya avatar Apr 01 '22 03:04 LindirQuenya

In case you're wondering about the point of b49d9c1: in my testing, it looked like typeorm doesn't translate undefined properties to NULL in the database - in fact, it doesn't seem to touch them at all. This (kinda old) comment suggests that this is intentional - we will need to actually set the property to null if we want it to be NULL in the DB.

LindirQuenya avatar Apr 02 '22 23:04 LindirQuenya

better-sqlite3 wasn't running the migrations properly on Windows, so I've reverted c64d1f7. Performance is less important than the launcher working on Windows.

LindirQuenya avatar Apr 07 '22 00:04 LindirQuenya

This PR is going to end up containing fixes for all the random bugs that I stumble upon while writing tests. Sorry if that messes up organization, but I figured I might as well do this while I'm writing tests anyway.

LindirQuenya avatar Apr 19 '22 02:04 LindirQuenya

That should bring it up to date with develop. The GameManager tests are in the wrong place though, one moment.

LindirQuenya avatar May 27 '22 01:05 LindirQuenya