Skip to content

Commit 0a6d237

Browse files
authored
Preptember cleaning (OperationCode#1216)
* put "Who We Serve" under about sublinks * only lint and run unit tests in CI * simplify coverage metrics * sync up ignore files * update sitemap * remove allcontributors and update configs/dependencies * fix mergify config * explicitly set node version * be explicit with yarn version * nvm * install packages, not node * add cypress test status to mergify config * update README * force a new cypress build w/ a new commit * re-add cypress in CI
1 parent ac51332 commit 0a6d237

File tree

16 files changed

+83
-751
lines changed

16 files changed

+83
-751
lines changed

.all-contributorsrc

-504
This file was deleted.

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: 2.1
22

33
orbs:
4-
cypress: cypress-io/cypress@1.25.0
4+
cypress: cypress-io/cypress@1.26.0
55

66
executors:
77
default:

.eslintignore

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
common/styles/themeMap.js
1+
node_modules
2+
package.json
3+
yarn.lock
4+
.babelrc
5+
**/.babelrc
26
.next
37
.github
48
bin
5-
node_modules
69
static
7-
coverage
810
cypress-coverage
911
jest-coverage
10-
!.storybook
1112
.storybook-dist
13+
common/styles/themeMap.js

.gitignore

-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
# Operation Code-specific
2-
backend
3-
41
# No npm allowed
52
package-lock.json
63

74
# Cypress local support artifacts
85
cypress/screenshots
96
cypress/videos
107

11-
# All Contributors
12-
!.all-contributorsrc
13-
148
# Logs
159
logs
1610
*.log

.mergify.yml

+3-7
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@ pull_request_rules:
33
conditions:
44
- author=dependabot-preview[bot]
55
- '#changes-requested-reviews-by=0'
6-
- status-success=Vercel
7-
- status-success=deploy/netlify
8-
- 'status-success=ci/circleci: install_dependencies'
6+
- 'status-success=Vercel - operation-code'
7+
- 'status-success=Vercel - storybook'
98
- 'status-success=ci/circleci: lint'
109
- 'status-success=ci/circleci: unit_tests'
11-
- 'status-success=ci/circleci: cypress_install'
12-
- 'status-success=ci/circleci: integration_tests'
13-
- 'status-success=ci/circleci: report_coverage'
14-
- status-success=codeclimate
10+
- 'status-success=cypress: all tests'
1511
- status-success=codeclimate/diff-coverage
1612
- status-success=codeclimate/total-coverage
1713
actions:

.prettierignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
common/styles/themeMap.js
1+
node_modules
22
package.json
33
yarn.lock
44
.babelrc
55
**/.babelrc
66
.next
77
.github
88
bin
9-
node_modules
109
static
1110
cypress-coverage
1211
jest-coverage
1312
.storybook-dist
13+
common/styles/themeMap.js

.stylelintrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"**/*.js",
1111
"coverage/**/*",
1212
"cypress-coverage/**/*",
13-
"jest-coverage/**/*"
13+
"jest-coverage/**/*",
14+
"node_modules/**/*"
1415
],
1516
"rules": {
1617
"prettier/prettier": true,

README.md

+1-86
Large diffs are not rendered by default.

common/constants/navigation.js

+9-24
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import flattenDepth from 'lodash/flattenDepth';
22

33
// MARK: Links shared between nav and footer (no duplicate code)
4+
const whoWeServeLink = {
5+
name: 'Who We Serve',
6+
href: '/who_we_serve',
7+
};
8+
49
const contactLink = {
510
name: 'Contact Us',
611
href: '/contact',
@@ -27,11 +32,6 @@ const eventsLink = {
2732
};
2833

2934
// MARK: Top-level navigation items
30-
const whoWeServeLink = {
31-
name: 'Who We Serve',
32-
href: '/who_we_serve',
33-
};
34-
3535
const accountWithSublinks = {
3636
name: 'Account',
3737
href: '/login',
@@ -51,7 +51,7 @@ const accountWithSublinks = {
5151
const aboutUs = {
5252
name: 'About Us',
5353
href: '/about',
54-
sublinks: [contactLink, faqLink, podcastLink],
54+
sublinks: [whoWeServeLink, contactLink, faqLink, podcastLink],
5555
};
5656

5757
const events = {
@@ -83,14 +83,8 @@ const logout = {
8383
};
8484

8585
// MARK: Nav items
86-
export const loggedInNavItems = [aboutUs, whoWeServeLink, events, getInvolved, profile, logout];
87-
export const loggedOutNavItems = [
88-
aboutUs,
89-
whoWeServeLink,
90-
events,
91-
getInvolved,
92-
accountWithSublinks,
93-
];
86+
export const loggedInNavItems = [aboutUs, events, getInvolved, profile, logout];
87+
export const loggedOutNavItems = [aboutUs, events, getInvolved, accountWithSublinks];
9488

9589
// Extracts sublinks to list everything as a single, top-level list
9690
export const mobileLoggedInNavItems = flattenDepth(
@@ -135,10 +129,7 @@ export const footerItems = {
135129
name: 'Job Board',
136130
},
137131
eventsLink,
138-
{
139-
href: '/who_we_serve',
140-
name: 'Who We Serve',
141-
},
132+
whoWeServeLink,
142133
],
143134
column3: [
144135
getInvolvedLink,
@@ -174,12 +165,6 @@ export const footerItems = {
174165
href: '/terms',
175166
name: 'Terms of Use',
176167
},
177-
// TODO: Create a link for this
178-
// {
179-
// href: 'https://www.anotherfakeurl.com/',
180-
// name: 'Cookies',
181-
// analyticsEventLabel: 'Cookies',
182-
// },
183168
{
184169
// NOTE: If you change this route, please update the redirect in `vercel.json` as well
185170
href: 'https://www.iubenda.com/privacy-policy/8174861',

components/Nav/__tests__/__snapshots__/Nav.test.js.snap

+8-6
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ exports[`Nav should render with no props passed 1`] = `
1919
"href": "/about",
2020
"name": "About Us",
2121
},
22+
Object {
23+
"href": "/who_we_serve",
24+
"name": "Who We Serve",
25+
},
2226
Object {
2327
"href": "/contact",
2428
"name": "Contact Us",
@@ -87,6 +91,10 @@ exports[`Nav should render with no props passed 1`] = `
8791
name="About Us"
8892
sublinks={
8993
Array [
94+
Object {
95+
"href": "/who_we_serve",
96+
"name": "Who We Serve",
97+
},
9098
Object {
9199
"href": "/contact",
92100
"name": "Contact Us",
@@ -102,12 +110,6 @@ exports[`Nav should render with no props passed 1`] = `
102110
]
103111
}
104112
/>
105-
<NavListItem
106-
href="/who_we_serve"
107-
icon={null}
108-
name="Who We Serve"
109-
sublinks={Array []}
110-
/>
111113
<NavListItem
112114
href="/events"
113115
icon={null}

jest.config.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,22 @@ module.exports = {
3333
// An array of regexp pattern strings used to skip coverage collection
3434
coveragePathIgnorePatterns: [
3535
'<rootDir>/node_modules',
36+
'<rootDir>/cypress',
3637
'<rootDir>/common/config',
3738
'<rootDir>/common/styles',
3839
'<rootDir>/common/constants',
3940
'<rootDir>/scripts',
40-
'<rootDir>/cypress',
4141
'<rootDir>/test-utils',
4242

43-
// No real logic to test here
43+
// // No real logic to test here
4444
'<rootDir>/common/utils/api-utils.js',
4545
'<rootDir>/components/ZipRecruiterJobs/ZipRecruiterJobs.js',
4646
'<rootDir>/components/Press/PressLinks/Articles.js',
4747
'<rootDir>/components/Timeline/historyData.js',
4848

49-
// Don't collect coverage from import/export mappers
49+
// // Don't collect coverage from import/export mappers
5050
'<rootDir>/common/(.*)/index.js',
5151
'<rootDir>/components/(.*)/index.js',
52-
53-
// Ignore Next.js files
54-
'<rootDir>/components/head.js',
5552
],
5653

5754
// A list of reporter names that Jest uses when writing coverage reports

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@
9595
"@testing-library/cypress": "^7.0.0",
9696
"@testing-library/jest-dom": "^5.11.4",
9797
"@testing-library/react": "^11.0.2",
98-
"all-contributors-cli": "^6.17.2",
9998
"autoprefixer": "^9.8.6",
10099
"axios-mock-adapter": "^1.18.2",
101100
"babel-core": "7.0.0-bridge.0",

pages/join.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function Join({ router }) {
3737
columns={[
3838
<RegistrationForm onSuccess={handleSuccess} />,
3939
<p>
40-
Already registered?&nbsp;
40+
{'Already registered? '}
4141
<Link href="/login">
4242
<a>Login</a>
4343
</Link>

0 commit comments

Comments
 (0)