-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(requests-table):Implement requests table [Finishes #171380698]
- Loading branch information
1 parent
8c78fbd
commit a4703d0
Showing
58 changed files
with
1,794 additions
and
125 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
{ | ||
"presets": ["@babel/preset-env","@babel/preset-react"], | ||
"plugins": ["transform-class-properties"] | ||
"presets": [ | ||
"@babel/preset-env", | ||
"@babel/preset-react" | ||
], | ||
"plugins": [ | ||
"transform-class-properties", | ||
"@babel/plugin-proposal-class-properties", | ||
"@babel/plugin-transform-regenerator", | ||
"@babel/plugin-transform-runtime" | ||
] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: "2" | ||
checks: | ||
method-lines: | ||
config: | ||
threshold: 40 | ||
method-complexity: | ||
config: | ||
threshold: 6 | ||
exclude_patterns: | ||
- "**/__tests__/" |
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,2 +1,8 @@ | ||
#TO RUN THE SERVER | ||
PORT= #ADD PORT NUMBER HERE | ||
REACT_APP_PORT= #APP PORT_NUMBER GOES HERE | ||
|
||
# API BASE URL | ||
REACT_APP_API_URL= #BACKEND API BASE URL eg: https://bft-nmd-stag.herokuapp.com/api | ||
|
||
# TESTING TOKEN | ||
REACT_APP_SOME_TOKEN= # JWT_TOKEN eg: eyJhbGciO.... |
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
const requests = { | ||
tripRequests: [ | ||
{ | ||
id: 1, | ||
trips: [ | ||
{ | ||
travelDate: '2020-09-15', | ||
travelFrom: 'Kigali', | ||
travelTo: 'Durban', | ||
}, | ||
], | ||
travelReason: 'Africa Tech Summit', | ||
accommodation: true, | ||
status: 'pending', | ||
}, | ||
{ | ||
id: 2, | ||
trips: [ | ||
{ | ||
travelDate: '2020-09-10', | ||
travelFrom: 'Kigali', | ||
travelTo: 'Dubai', | ||
}, | ||
], | ||
travelReason: 'Africa Tech Summit', | ||
accommodation: true, | ||
status: 'pending', | ||
}, | ||
], | ||
}; | ||
|
||
export default requests; |
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* eslint-disable no-undef */ | ||
import React from 'react'; | ||
import { createMount } from '@material-ui/core/test-utils'; | ||
import Link from '@material-ui/core/Link'; | ||
import { cleanup } from '@testing-library/react'; | ||
import CustomCard from '../CustomCard'; | ||
|
||
const title = 'Our Company'; | ||
const items = ['Careers', 'About', 'Vision']; | ||
|
||
describe('<CustomCard />', () => { | ||
afterEach(() => cleanup); | ||
|
||
it('Should match the CustomCard snapshot', () => { | ||
const component = createMount()( | ||
<CustomCard title={title} items={items} />, | ||
); | ||
|
||
expect(component.html).toMatchSnapshot(); | ||
expect(component.find(Link)).toHaveLength(3); | ||
}); | ||
}); |
3 changes: 3 additions & 0 deletions
3
src/components/CustomCard/__tests__/__snapshots__/CustomCard.test.js.snap
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<CustomCard /> Should match the CustomCard snapshot 1`] = `[Function]`; |
Oops, something went wrong.