lint, add spec, add info button to added roles

This commit is contained in:
AlecM33
2022-06-19 16:24:47 -04:00
parent 99a5455713
commit c86e106060
6 changed files with 64 additions and 44 deletions

View File

@@ -104,5 +104,20 @@ describe('Create page', function () {
expect(gameCreationStepManager.deckManager.deck.length).toEqual(5);
expect(document.querySelectorAll('.added-role').length).toEqual(5);
});
it('clear existing added cards and leave only what roles are part of the template', () => {
document.getElementById('role-category-default').click();
const roles = document.querySelectorAll('.default-role');
roles.forEach((el) => {
const plusElement = el.querySelector('.role-include');
plusElement.click();
});
document.getElementById('deck-template-button').click();
document.querySelectorAll('.template-option')[0].click();
expect(gameCreationStepManager.deckManager.deck.length).toEqual(5);
expect(document.querySelectorAll('.added-role').length).toEqual(5);
});
});
});