-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VACMS-15699 Clean up code in the header/footer directories (#26524)
- Loading branch information
Showing
32 changed files
with
45 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
src/platform/site-wide/header/components/App/index.unit.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,24 @@ | ||
// Node modules. | ||
import React from 'react'; | ||
import { expect } from 'chai'; | ||
import { shallow } from 'enzyme'; | ||
// Relative imports. | ||
import { App } from '.'; | ||
|
||
describe('Header <App>', () => { | ||
it('renders legacy header when our width is more than 768px', () => { | ||
// Set up. | ||
window.innerWidth = 768; | ||
const wrapper = shallow(<App show />); | ||
|
||
// Assertions. | ||
expect(wrapper.find(`Header`)).to.have.lengthOf(0); | ||
|
||
// Clean up. | ||
wrapper.unmount(); | ||
}); | ||
|
||
it('renders header v2 when our width is less than 768px', () => { | ||
// Set up. | ||
window.innerWidth = 767; | ||
const wrapper = shallow(<App show />); | ||
|
||
// Assertions. | ||
expect(wrapper.find(`Header`)).to.have.lengthOf(1); | ||
|
||
// Clean up. | ||
wrapper.unmount(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
src/platform/site-wide/header/components/Header/index.unit.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
// Node modules. | ||
import React from 'react'; | ||
|
||
export const Logo = props => ( | ||
|
5 changes: 0 additions & 5 deletions
5
src/platform/site-wide/header/components/Logo/index.unit.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,14 @@ | ||
// Node modules. | ||
import React from 'react'; | ||
import { expect } from 'chai'; | ||
import { shallow } from 'enzyme'; | ||
// Relative imports. | ||
import { Logo } from '.'; | ||
|
||
describe('Header <Logo>', () => { | ||
it('renders content', () => { | ||
// Set up. | ||
const wrapper = shallow(<Logo />); | ||
|
||
// Assertions. | ||
expect(wrapper.find(`svg`)).to.have.lengthOf(1); | ||
|
||
// Clean up. | ||
wrapper.unmount(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.