-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from karpolan/dev
Release 2.1.19
- Loading branch information
Showing
71 changed files
with
3,992 additions
and
19,268 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,2 +1,9 @@ | ||
|
||
# Debug mode | ||
REACT_APP_DEBUG = true | ||
|
||
# API/Backend basic URL | ||
REACT_APP_URL_API = http://localhost:3030/api | ||
|
||
# Runtime helpers | ||
REACT_APP_VERSION = $npm_package_version | ||
REACT_APP_URL_API = http://localhost:3030/api |
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 |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
|
||
# misc | ||
.DS_Store | ||
.env | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
|
Large diffs are not rendered by default.
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
This file was deleted.
Oops, something went wrong.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
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,22 @@ | ||
{ | ||
"name": "_TITLE_", | ||
"short_name": "_TITLE_", | ||
"description": "_DESCRIPTION_", | ||
"start_url": ".", | ||
"theme_color": "#000000", | ||
"background_color": "#ffffff", | ||
"display": "standalone", | ||
"orientation": "portrait", | ||
"icons": [ | ||
{ | ||
"src": "favicon.ico?v=1.0", | ||
"sizes": "48x48 32x32 16x16", | ||
"type": "image/x-icon" | ||
}, | ||
{ "src": "img/favicon/16x16.png?v=1.0", "sizes": "16x16", "type": "image/png" }, | ||
{ "src": "img/favicon/32x32.png?v=1.0", "sizes": "32x32", "type": "image/png" }, | ||
{ "src": "img/favicon/180x180.png?v=1.0", "sizes": "180x180", "type": "image/png" }, | ||
{ "src": "img/favicon/192x192.png?v=1.0", "sizes": "192x192", "type": "image/png" }, | ||
{ "src": "img/favicon/512x512.png?v=1.0", "sizes": "512x512", "type": "image/png" } | ||
] | ||
} |
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,27 +1,22 @@ | ||
import { AppStore } from './store'; | ||
import { AppThemeProvider } from './theme'; | ||
import Routes from './routes'; | ||
import Layout from './layout'; | ||
import { AppStore } from './store'; | ||
import { ErrorBoundary } from './components'; | ||
import { BrowserRouter } from 'react-router-dom'; | ||
import Routes from './routes'; | ||
|
||
/** | ||
* Root Application Component | ||
* @component MainApp | ||
*/ | ||
const App = () => { | ||
const MainApp = () => { | ||
return ( | ||
<ErrorBoundary name="App"> | ||
<AppStore> | ||
<AppThemeProvider> | ||
<BrowserRouter> | ||
<Layout> | ||
<Routes /> | ||
</Layout> | ||
</BrowserRouter> | ||
<Routes /> | ||
</AppThemeProvider> | ||
</AppStore> | ||
</ErrorBoundary> | ||
); | ||
}; | ||
|
||
export default App; | ||
export default MainApp; |
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,55 @@ | ||
import { render, screen } from '@testing-library/react'; | ||
import AppAlert from './AppAlert'; | ||
import { capitalize, randomText } from '../../utils'; | ||
import { AlertProps } from '@mui/material'; | ||
|
||
const ComponentToTest = AppAlert; | ||
|
||
/** | ||
* Tests for <AppAlert/> component | ||
*/ | ||
describe('<AppAlert/> component', () => { | ||
it('renders itself', () => { | ||
const testId = randomText(8); | ||
render(<ComponentToTest data-testid={testId} />); | ||
const alert = screen.getByTestId(testId); | ||
expect(alert).toBeDefined(); | ||
expect(alert).toHaveAttribute('role', 'alert'); | ||
expect(alert).toHaveClass('MuiAlert-root'); | ||
}); | ||
|
||
it('supports .severity property', () => { | ||
const SEVERITIES = ['error', 'info', 'success', 'warning']; | ||
for (const severity of SEVERITIES) { | ||
const testId = randomText(8); | ||
const severity = 'success'; | ||
render( | ||
<ComponentToTest | ||
data-testid={testId} | ||
severity={severity} | ||
variant="filled" // Needed to verify exact MUI classes | ||
/> | ||
); | ||
const alert = screen.getByTestId(testId); | ||
expect(alert).toBeDefined(); | ||
expect(alert).toHaveClass(`MuiAlert-filled${capitalize(severity)}`); | ||
} | ||
}); | ||
|
||
it('supports .variant property', () => { | ||
const VARIANTS = ['filled', 'outlined', 'standard']; | ||
for (const variant of VARIANTS) { | ||
const testId = randomText(8); | ||
render( | ||
<ComponentToTest | ||
data-testid={testId} | ||
variant={variant as AlertProps['variant']} | ||
severity="warning" // Needed to verify exact MUI classes | ||
/> | ||
); | ||
const alert = screen.getByTestId(testId); | ||
expect(alert).toBeDefined(); | ||
expect(alert).toHaveClass(`MuiAlert-${variant}Warning`); | ||
} | ||
}); | ||
}); |
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.
b7b38da
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
react-typescript-material-ui-with-auth-starter – ./
react-typescript-material-ui-with-auth-starter-karpolan.vercel.app
react-typescript-material-ui-with-auth-star-git-9a3be8-karpolan.vercel.app
react-typescript-material-ui-with-auth-starter.vercel.app