From e923fb058f10ffd7d60019dcbb5611f2829603eb Mon Sep 17 00:00:00 2001
From: jherman5 <jherman5@huskers.unl.edu>
Date: Mon, 7 Sep 2020 09:30:33 -0500
Subject: [PATCH] fixed the test issues within app.test.

---
 simon-says/src/__snapshots__/app.test.js.snap |  2 ++
 simon-says/src/app.test.js                    | 23 +++++++++++--------
 2 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/simon-says/src/__snapshots__/app.test.js.snap b/simon-says/src/__snapshots__/app.test.js.snap
index ce50593..186758b 100644
--- a/simon-says/src/__snapshots__/app.test.js.snap
+++ b/simon-says/src/__snapshots__/app.test.js.snap
@@ -1,5 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
+exports[`the app has four colored buttons, red, blue, yellow, and green 1`] = `<div />`;
+
 exports[`the app has one labeled button that displays the value from the store 1`] = `
 <div>
   <label>
diff --git a/simon-says/src/app.test.js b/simon-says/src/app.test.js
index c329744..6dbc5fd 100644
--- a/simon-says/src/app.test.js
+++ b/simon-says/src/app.test.js
@@ -1,5 +1,3 @@
-/* eslint-disable no-magic-numbers */
-
 import React from 'react';
 import { render } from '@testing-library/react';
 import './testing/mockRedux.js';
@@ -7,16 +5,23 @@ import { MemoryRouter as Router } from 'react-router-dom';
 
 import { App } from './app.js';
 
-import {
-  selectValue,
-} from './features/counter/counterSlice.js';
-jest.mock('./features/counter/counterSlice.js', () => ({
-  selectValue: jest.fn().mockName('selectValue'),
+jest.mock('./features/patternGen/patternSlice.js', () => ({
+  selectColorOne: jest.fn().mockName('selectColorOne'),
+  showColorOne: jest.fn().mockName('showColorOne'),
+  hideColorOne: jest.fn().mockName('hideColorOne'),
+  selectColorTwo: jest.fn().mockName('selectColorTwo'),
+  showColorTwo: jest.fn().mockName('showColorTwo'),
+  hideColorTwo: jest.fn().mockName('hideColorTwo'),
+  selectColorThree: jest.fn().mockName('selectColorThree'),
+  showColorThree: jest.fn().mockName('showColorThree'),
+  hideColorThree: jest.fn().mockName('hideColorThree'),
+  selectColorFour: jest.fn().mockName('selectColorFour'),
+  showColorFour: jest.fn().mockName('showColorFour'),
+  hideColorFour: jest.fn().mockName('hideColorFour'),
 }));
 
 describe('the app', () => {
-  test('has one labeled button that displays the value from the store', () => {
-    selectValue.mockReturnValue(9999);
+  test('has four colored buttons, red, blue, yellow, and green', () => {
     const { container } = render(
       <Router initialEntries={['/']}>
         <App />
-- 
GitLab