Add a test helper to build the svg document

This commit is contained in:
2025-06-16 22:41:31 -07:00
parent 4380d10dde
commit 49e09fbc21
2 changed files with 8 additions and 4 deletions

View File

@@ -27,7 +27,7 @@ describe('a trooper', () => {
beforeEach(async () => {
await mockResponse(driver, `/assets/images/${scenario}`, fixture, (document) => {
placeCounter(document, createTroopCounter(), { x: 1, y: 1 });
return `<?xml version="1.0" standalone="yes"?>\n` + document.querySelector('svg').outerHTML;
return svgDocument(document);
});
});
@@ -73,7 +73,7 @@ describe('a selected trooper', () => {
beforeEach(async () => {
await mockResponse(driver, `/assets/images/${scenario}`, fixture, (document) => {
placeCounter(document, selectCounter(createTroopCounter()), { x: 1, y: 1 });
return `<?xml version="1.0" standalone="yes"?>\n` + document.querySelector('svg').outerHTML;
return svgDocument(document);
});
});