diff --git a/spec/app/pages/timer-page.spec.ts b/spec/app/pages/timer-page.spec.ts index 2c34e1e..d7c5e0c 100644 --- a/spec/app/pages/timer-page.spec.ts +++ b/spec/app/pages/timer-page.spec.ts @@ -30,4 +30,37 @@ describe('TimerPage', () => { }) }) }) + + describe('methods', () => { + describe('plusScaleButton', () => { + it('scaleの値が変わること', () => { + const wrapper = factory() + wrapper.vm.scale = 1 + wrapper.vm.plusScaleButton() + expect(wrapper.vm.scale).toBe(1 + 0.1) + }) + }) + + describe('minusScaleButton', () => { + it('scaleの値が変わること', () => { + const wrapper = factory() + wrapper.vm.scale = 0.6 + wrapper.vm.minusScaleButton() + expect(wrapper.vm.scale).toBe(0.6 - 0.1) + + wrapper.vm.scale = 0.5 + wrapper.vm.minusScaleButton() + expect(wrapper.vm.scale).toBe(0.5) + }) + }) + + describe('resetScaleButton', () => { + it('scaleの値が変わること', () => { + const wrapper = factory() + wrapper.vm.scale = 2.5 + wrapper.vm.resetScaleButton() + expect(wrapper.vm.scale).toBe(1) + }) + }) + }) })