diff --git a/src/routes/export/print/PrintShip/Firecons/index.svelte b/src/routes/export/print/PrintShip/Firecons/index.svelte new file mode 100644 index 0000000..a777156 --- /dev/null +++ b/src/routes/export/print/PrintShip/Firecons/index.svelte @@ -0,0 +1,19 @@ +
+ {#each Array.from({ length: stations }) as firecon} + firecon + {/each} +
+ + + + diff --git a/src/lib/components/Output/Print/Weapons/Beam/index.svelte b/src/routes/export/print/PrintShip/Weapons/Beam.svelte similarity index 57% rename from src/lib/components/Output/Print/Weapons/Beam/index.svelte rename to src/routes/export/print/PrintShip/Weapons/Beam.svelte index 635f66e..ab51c34 100644 --- a/src/lib/components/Output/Print/Weapons/Beam/index.svelte +++ b/src/routes/export/print/PrintShip/Weapons/Beam.svelte @@ -1,11 +1,4 @@ -
+
{weaponClass} @@ -14,20 +7,12 @@
diff --git a/src/routes/export/print/PrintShip/Weapons/index.test.js b/src/routes/export/print/PrintShip/Weapons/index.test.js new file mode 100644 index 0000000..75d5c26 --- /dev/null +++ b/src/routes/export/print/PrintShip/Weapons/index.test.js @@ -0,0 +1,12 @@ +import { render, fireEvent } from "@testing-library/svelte"; +import "@testing-library/jest-dom"; +import { weaponTypes } from "$lib/store/ship/weaponry/rules"; + +import printComp from "./printComp.js"; + +describe("all weapons have a print component", () => { + test.each(weaponTypes)("$type", ({ type, initial }) => { + expect(printComp).toHaveProperty(type); + render(printComp[type], { props: initial }); + }); +}); diff --git a/src/routes/export/print/PrintShip/Weapons/printComps.js b/src/routes/export/print/PrintShip/Weapons/printComps.js new file mode 100644 index 0000000..511ba3b --- /dev/null +++ b/src/routes/export/print/PrintShip/Weapons/printComps.js @@ -0,0 +1,5 @@ +import Beam from "./Beam.svelte"; + +export default { + beam: Beam, +}; diff --git a/src/routes/export/print/PrintShip/index.svelte b/src/routes/export/print/PrintShip/index.svelte index bcdacaf..3d92946 100644 --- a/src/routes/export/print/PrintShip/index.svelte +++ b/src/routes/export/print/PrintShip/index.svelte @@ -3,6 +3,8 @@