import React from 'react';
import { render } from '@testing-library/react';

import InputForm from './InputForm';

/* globals test, expect */

test('Form should contain Input legend', () => {
  const { getByText } = render(<InputForm />);
  const legend = getByText('Input');
  expect(legend).toBeInTheDocument();
});

test('Form should contain Coordinates input', () => {
  const { getByLabelText } = render(<InputForm />);
  const label = getByLabelText('Your coordinates:');
  expect(label).toBeInTheDocument();
});

test('Form should contain File input', () => {
  const { getByLabelText } = render(<InputForm />);
  const label = getByLabelText('Input file:');
  expect(label).toBeInTheDocument();
});

test('Form should contain Submit butotn', () => {
  const { getByText } = render(<InputForm />);
  const button = getByText('Read data');
  expect(button).toBeInTheDocument();
});

@@ -70,16 +70,61 @@
 eact';%0A%0A
+import NCState from './../context/NCState';%0A%0A
 import I
@@ -181,16 +181,97 @@
 ect */%0A%0A
+const renderForm = () =%3E render(%0A  %3CNCState%3E%0A    %3CInputForm /%3E%0A  %3C/NCState%3E,%0A);%0A%0A
 test('Fo
@@ -337,38 +337,29 @@
 t %7D = render
-(%3CInput
 Form
- /%3E
+(
 );%0A  const l
@@ -514,38 +514,29 @@
 t %7D = render
-(%3CInput
 Form
- /%3E
+(
 );%0A  const l
@@ -699,38 +699,29 @@
 t %7D = render
-(%3CInput
 Form
- /%3E
+(
 );%0A  const l
@@ -884,22 +884,13 @@
 nder
-(%3CInput
 Form
- /%3E
+(
 );%0A 

Fix InputForm test with NCState