Skip to content

Commit

Permalink
Merge pull request Tech-N-Science#661 from sudeep162002/main
Browse files Browse the repository at this point in the history
updated home and footer test cases
  • Loading branch information
Amit366 authored May 28, 2022
2 parents 6dea94d + fc34839 commit ee46c39
Show file tree
Hide file tree
Showing 2 changed files with 166 additions and 0 deletions.
107 changes: 107 additions & 0 deletions funwithphysics/src/Components/Footer/Footer.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
// setup file
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';

configure({ adapter: new Adapter() });

import Footer from './Footer'
import {shallow} from 'enzyme'

describe ("main HTML element checque", ()=>{

it('object check',()=>{
let wrapper=shallow(<Footer/>)
expect(wrapper.exists('.main-content')).toEqual(true);
})

it('object check',()=>{
let wrapper=shallow(<Footer/>)
expect(wrapper.exists('.center1 box')).toEqual(true);
})

it('object check',()=>{
let wrapper=shallow(<Footer/>)
expect(wrapper.exists('.fas fa-user')).toEqual(true);
})

it('object check',()=>{
let wrapper=shallow(<Footer/>)
expect(wrapper.exists('.contact')).toEqual(true);
})

it('object check',()=>{
let wrapper=shallow(<Footer/>)
expect(wrapper.exists('.center box')).toEqual(true);
})

it('object check',()=>{
let wrapper=shallow(<Footer/>)
expect(wrapper.exists('.fab fa-facebook-f')).toEqual(true);
})

it('object check',()=>{
let wrapper=shallow(<Footer/>)
expect(wrapper.exists('.fab fa-twitter')).toEqual(true);
})

it('object check',()=>{
let wrapper=shallow(<Footer/>)
expect(wrapper.exists('.fab fa-instagram')).toEqual(true);
})


it('object check',()=>{
let wrapper=shallow(<Footer/>)
expect(wrapper.exists('.fab fa-linkedin-in')).toEqual(true);
})

it('object check',()=>{
let wrapper=shallow(<Footer/>)
expect(wrapper.exists('.fas fa-map-marker-alt')).toEqual(true);
})

it('object check',()=>{
let wrapper=shallow(<Footer/>)
expect(wrapper.exists('.email')).toEqual(true);
})

it('object check',()=>{
let wrapper=shallow(<Footer/>)
expect(wrapper.exists('.bottom')).toEqual(true);
})

it('object check',()=>{
let wrapper=shallow(<Footer/>)
expect(wrapper.exists('.far fa-copyright')).toEqual(true);
})
})


describe ("links and copywright verification", ()=>{
it('object check',()=>{
let wrapper=shallow(<Footer/>)
expect(wrapper.contains(<span className="text">
Anand Arcade,Block C(G-4),MSR Layout,Chandrampalem,VSKP,AP-48
</span>)).toEqual(true);
})

it('object check',()=>{
let wrapper=shallow(<Footer/>)
expect(wrapper.contains(<span className="text">[email protected]</span>)).toEqual(true);
})


it('object check',()=>{
let wrapper=shallow(<Footer/>)
expect(wrapper.contains(<span> 2022 All rights reserved.</span>)).toEqual(true);
})


it('object check',()=>{
let wrapper=shallow(<Footer/>)
expect(wrapper.contains(<span> 2022 All rights reserved.</span>)).toEqual(true);
})
})



59 changes: 59 additions & 0 deletions funwithphysics/src/Components/Home/Home.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// setup file
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';

configure({ adapter: new Adapter() });

import Home from './Home'
import {shallow} from 'enzyme'

describe ("main HTML element checque", ()=>{

it('object check',()=>{
let wrapper=shallow(<Home/>)
expect(wrapper.exists('.banner')).toEqual(true);
})

it('object check',()=>{
let wrapper=shallow(<Home/>)
expect(wrapper.exists('.banner_container')).toEqual(true);
})


it('object check',()=>{
let wrapper=shallow(<Home/>)
expect(wrapper.exists('.blur-background')).toEqual(true);
})


it('object check',()=>{
let wrapper=shallow(<Home/>)
expect(wrapper.exists('.banner_button')).toEqual(true);
})


it('object check',()=>{
let wrapper=shallow(<Home/>)
expect(wrapper.exists('.btn btn-light')).toEqual(true);
})


it('object check',()=>{
let wrapper=shallow(<Home/>)
expect(wrapper.exists('.fas fa-book-reader')).toEqual(true);
})


it('object check',()=>{
let wrapper=shallow(<Home/>)
expect(wrapper.exists('.gotopbtn')).toEqual(true);
})


it('object check',()=>{
let wrapper=shallow(<Home/>)
expect(wrapper.exists('.fas fa-arrow-up flexMe')).toEqual(true);
})


})

0 comments on commit ee46c39

Please sign in to comment.