From 792a6fea3a42ee055bd6bf4b5b4866c18df33589 Mon Sep 17 00:00:00 2001
From: Joni Laukka <joni.laukka.overflow@gmail.com>
Date: Fri, 5 Jul 2019 09:29:59 +0300
Subject: [PATCH] buttons ids added

---
 src/components/TaskList.js       | 6 +++---
 src/components/TaskListButton.js | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/components/TaskList.js b/src/components/TaskList.js
index 969683b..38ffa4c 100644
--- a/src/components/TaskList.js
+++ b/src/components/TaskList.js
@@ -89,9 +89,9 @@ class TaskList extends React.Component{
         <h1>Tasklist</h1>
         <form className='task-form' onSubmit={this.handleTaskCreation}>
           <label>New task</label>
-          <input type='text' placeholder='Task name' minLength="3" value={this.state.taskNameInput} onChange={(e) => this.setState({taskNameInput: e.target.value})}></input>
-          <textarea placeholder='Task description' value={this.state.taskDescriptionInput} onChange={(e) => this.setState({taskDescriptionInput: e.target.value})}></textarea>
-          <button type="submit">Add new task</button>
+          <input id="taskNameInput" type='text' placeholder='Task name' minLength="3" value={this.state.taskNameInput} onChange={(e) => this.setState({taskNameInput: e.target.value})}></input>
+          <textarea id="taskDescriptionInput" placeholder='Task description' value={this.state.taskDescriptionInput} onChange={(e) => this.setState({taskDescriptionInput: e.target.value})}></textarea>
+          <button id="newTaskSubmitButton" type="submit">Add new task</button>
         </form>
         {tasks}
       </div>,
diff --git a/src/components/TaskListButton.js b/src/components/TaskListButton.js
index 045e6c1..5734a02 100644
--- a/src/components/TaskListButton.js
+++ b/src/components/TaskListButton.js
@@ -36,7 +36,7 @@ class TaskListButton extends React.Component{
   render(){
     return(
       <Fragment>
-        <button onClick={this.handleClick}>Tasks ({this.state.newTasks})</button>
+        <button id="tasklistButton" onClick={this.handleClick}>Tasks ({this.state.newTasks})</button>
         {this.state.open && <TaskList />}
       </Fragment>
     );
-- 
GitLab