import React from 'react';
import { shallow, mount } from 'enzyme';
import MainScreen from './MainScreen.jsx'
import MockData from '../../MockData'

describe('MainScreen', () => {

  const mockFn = jest.fn();
  const component = shallow(<MainScreen weather={MockData} changeLocation={mockFn}/>);

  it('should render a search bar', () => {
    const searchBar = component.find('#main-').debug();

      expect(component.contains(searchBar)).toEqual(true);
  });

  it('should render an hourly forecast', () => {
    const hourlyForecast = component.find('.hourly-text').debug();

    expect(component.debug()).toContain(hourlyForecast);
  })

  it('should render a 10-day forecast', () => {
    const tenDayForecast = component.find('.ten-day-text').debug();

    expect(component.debug()).toContain(tenDayForecast);
  })

  it('should render a current forecast', () => {
    const currentForecast = component.find('.main-current').debug();

    expect(component.debug()).toContain(currentForecast);
  })



});

@@ -222,23 +222,21 @@
 onent = 
-shallow
+mount
 (%3CMainSc
@@ -375,16 +375,22 @@
 ('#main-
+search
 ').debug
@@ -393,19 +393,84 @@
 ebug();%0A
-%0A
   
+  const autoCompleteList = %3Cul className=%22autocomplete-list%22 /%3E;%0A%0A
     expe
@@ -491,25 +491,32 @@
 ontains(
-searchBar
+autoCompleteList
 )).toEqu
@@ -609,49 +609,63 @@
 cast
- = component.find('.hourly-text').debug()
+Text = %3Ch2 className=%22hourly-text%22%3EHourly Forecast%3C/h2%3E
 ;%0A%0A 
@@ -684,34 +684,24 @@
 mponent.
-debug()).toC
+c
 ontain
+s
 (hourlyF
@@ -699,39 +699,59 @@
 s(hourlyForecast
+Text)).toEqual(true
 );%0A  %7D)
+;
 %0A%0A  it('should r
@@ -812,50 +812,64 @@
 cast
- = component.find('.ten-day-text').debug()
+Text = %3Ch2 className=%22ten-day-text%22%3E10 Day Forecast%3C/h2%3E
 ;%0A%0A 
@@ -888,34 +888,24 @@
 mponent.
-debug()).toC
+c
 ontain
+s
 (tenDayF
@@ -911,23 +911,43 @@
 Forecast
+Text)).toEqual(true
 );%0A  %7D)
+;
 %0A%0A  it('
@@ -1010,58 +1010,85 @@
 rent
-Forecast = component.find('.main-current').debug()
+Date = %3Ch1 className=%22current-date%22%3ELast Updated on June 2, 12:57 PM MDT%3C/h1%3E
 ;%0A%0A 
@@ -1111,34 +1111,24 @@
 ent.
-debug()).toC
+c
 ontain
+s
 (current
 Fore
@@ -1127,26 +1127,35 @@
 rent
-Forecast
+Date)).toEqual(true
 );%0A  %7D)
-%0A%0A%0A
+;
 %0A%7D);

add Nik edits