Skip to content

Commit

Permalink
test file added
Browse files Browse the repository at this point in the history
  • Loading branch information
Luxshan2000 committed Oct 15, 2023
1 parent 55832fb commit 1512636
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 16 deletions.
1 change: 0 additions & 1 deletion webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "webapp",
"version": "0.1.0",
"private": true,
"type": "module",
"dependencies": {
"@greatsumini/react-facebook-login": "^3.3.3",
"@react-oauth/google": "^0.11.1",
Expand Down
8 changes: 4 additions & 4 deletions webapp/src/Todo.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useState } from "react";
import FloatingLabel from 'react-bootstrap/FloatingLabel';
import Form from 'react-bootstrap/Form';

import { Link } from "react-router-dom";
import Button from 'react-bootstrap/Button';
import Spinner from 'react-bootstrap/Spinner';
import Alert from 'react-bootstrap/Alert';
Expand Down Expand Up @@ -60,9 +60,9 @@ export default function Todo() {


<div style={{textAlign:'left'}}>
<a href='/resetpassword' style={{fontSize:12,}}>
<Link to='/resetpassword' style={{fontSize:12,}}>
Forgot your password?
</a>
</Link>
</div>

{feedBack && <Alert onClose={()=> setFeedback("") } variant="danger" className=" text-center" dismissible >{feedBack}</Alert> }
Expand Down Expand Up @@ -101,7 +101,7 @@ export default function Todo() {


<p className="mb-3" style={{ fontSize: '12', fontWeight: 'lighter',textAlign:'center'}}>
If you haven't registered yet? <a href='/signup'><span>Register now</span></a>
If you haven't registered yet? <Link to='/signup'><span>Register now</span></Link>
</p>
</div>
</Form>
Expand Down
16 changes: 13 additions & 3 deletions webapp/src/__tests__/Login.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
test('Login test ', () => {
expect(true).toBe(true)
})
import { render, screen } from '@testing-library/react';
import Todo from '../Todo';
import { MemoryRouter } from 'react-router-dom';

test('renders learn react link', () => {
render(
<MemoryRouter>
<Todo />
</MemoryRouter>
);
// const linkElement = screen.getByText(/learn react/i);
// expect(linkElement).toBeInTheDocument();
});
3 changes: 3 additions & 0 deletions webapp/src/__tests__/ProgressChart.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
test('ProgressChart component renders withput crashing', () => {
expect(true).toBe(true)
})
8 changes: 0 additions & 8 deletions webapp/src/__tests__/Todo.test.js

This file was deleted.

3 changes: 3 additions & 0 deletions webapp/src/__tests__/Topic.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
test('Topic component renders withput crashing', () => {
expect(true).toBe(true)
})

0 comments on commit 1512636

Please sign in to comment.