Skip to content

Commit

Permalink
add v1.7/v1.8 3D tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielburnworth committed Nov 26, 2024
1 parent 82c7da3 commit 04fc858
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
14 changes: 14 additions & 0 deletions frontend/three_d_garden/__tests__/bot_test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,20 @@ describe("<Bot />", () => {
.toEqual([-1344, 110, 75]);
});

it("renders: v1.7", () => {
const p = fakeProps();
p.config.kitVersion = "v1.7";
const wrapper = mount(<Bot {...p} />);
expect(wrapper.find({ name: "button-group" }).length).toEqual(10);
});

it("renders: v1.8", () => {
const p = fakeProps();
p.config.kitVersion = "v1.8";
const wrapper = mount(<Bot {...p} />);
expect(wrapper.find({ name: "button-group" }).length).toEqual(6);
});

it("loads shapes", () => {
const p = fakeProps();
mount(<Bot {...p} />);
Expand Down
5 changes: 4 additions & 1 deletion frontend/three_d_garden/__tests__/packaging_test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ describe("<Packaging />", () => {
});

it("renders", () => {
const wrapper = mount(<Packaging {...fakeProps()} />);
const p = fakeProps();
p.config.kitVersion = "v1.7";
const wrapper = mount(<Packaging {...p} />);
expect(wrapper.html()).toContain("packaging");
expect(wrapper.html()).toContain("100");
expect(wrapper.html()).not.toContain("170");
Expand All @@ -19,6 +21,7 @@ describe("<Packaging />", () => {
it("renders: XL", () => {
const p = fakeProps();
p.config.sizePreset = "Genesis XL";
p.config.kitVersion = "v1.8";
const wrapper = mount(<Packaging {...p} />);
expect(wrapper.html()).toContain("170");
expect(wrapper.html()).not.toContain("100");
Expand Down

0 comments on commit 04fc858

Please sign in to comment.