on3iro / aeons-end-randomizer

🧙🏻‍♀️Awesome Companion App for Aeons End: https://aeons-end-randomizer.de 🧙🏽‍♂️
MIT License
43 stars 24 forks source link

[BUGFIX] Fix mages not being removed from the recruited list after rerecruiting #456

Closed sarathas closed 2 years ago

sarathas commented 2 years ago

rerecruiting

Issue: #455

Mages stayed in the recruited list after rerecruiting because they were distinguished by name (which is a non unique feature any more). The key has been adapted to be the id instead.

sarathas commented 2 years ago

EZ fix, however untested since I do not really know where to start here. The bug is only visible on the whole page, however we would ahve to mock the setMages function in order to reproduce it on a unit test level. On integration test level (cypress), this is hard to reproduce since the mages are selected at random.

on3iro commented 2 years ago

@sarathas yeah, things like this are really hard to test. I already though that it might be useful to also use some kind of seed for the regular randomization so that we can change the seed for testing purposes...

Anyway, thanks for the fix :tada: