mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
Fix database
This commit is contained in:
@@ -34,12 +34,9 @@ test-frontend:
|
|||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
- frontend/node_modules/
|
- frontend/node_modules/
|
||||||
key:
|
|
||||||
files:
|
|
||||||
- frontend/package-lock.json
|
|
||||||
before_script:
|
before_script:
|
||||||
- cd frontend
|
- cd frontend
|
||||||
- npm ci
|
- npm install
|
||||||
script:
|
script:
|
||||||
- npm run test
|
- npm run test
|
||||||
rules:
|
rules:
|
||||||
|
@@ -2,28 +2,31 @@
|
|||||||
"name": "employee-request-system-frontend",
|
"name": "employee-request-system-frontend",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "Frontend for Employee Request System",
|
"description": "Frontend for Employee Request System",
|
||||||
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "react-scripts start",
|
"start": "react-scripts start",
|
||||||
"build": "react-scripts build",
|
"build": "react-scripts build",
|
||||||
"test": "echo \"No tests yet - this is a placeholder for future tests\" && exit 0",
|
"test": "react-scripts test --watchAll=false --passWithNoTests",
|
||||||
"eject": "react-scripts eject"
|
"eject": "react-scripts eject"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/react": "^11.11.3",
|
|
||||||
"@emotion/styled": "^11.11.0",
|
|
||||||
"@mui/material": "^5.15.3",
|
|
||||||
"@mui/icons-material": "^5.15.3",
|
|
||||||
"axios": "^1.6.5",
|
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-router-dom": "^6.21.1",
|
"react-router-dom": "^6.21.1",
|
||||||
"react-scripts": "5.0.1"
|
"react-scripts": "5.0.1",
|
||||||
|
"axios": "^1.6.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@testing-library/jest-dom": "^5.17.0",
|
"@testing-library/jest-dom": "^5.17.0",
|
||||||
"@testing-library/react": "^13.4.0",
|
"@testing-library/react": "^13.4.0",
|
||||||
"@testing-library/user-event": "^13.5.0"
|
"@testing-library/user-event": "^13.5.0"
|
||||||
},
|
},
|
||||||
|
"eslintConfig": {
|
||||||
|
"extends": [
|
||||||
|
"react-app",
|
||||||
|
"react-app/jest"
|
||||||
|
]
|
||||||
|
},
|
||||||
"browserslist": {
|
"browserslist": {
|
||||||
"production": [
|
"production": [
|
||||||
">0.2%",
|
">0.2%",
|
||||||
|
14
frontend/public/index.html
Normal file
14
frontend/public/index.html
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<meta name="theme-color" content="#000000" />
|
||||||
|
<meta name="description" content="Employee Request System" />
|
||||||
|
<title>Employee Request System</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
|
<div id="root"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
13
frontend/src/App.js
Normal file
13
frontend/src/App.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
function App() {
|
||||||
|
return (
|
||||||
|
<div className="App">
|
||||||
|
<header className="App-header">
|
||||||
|
<h1>Employee Request System</h1>
|
||||||
|
</header>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default App;
|
@@ -1,6 +1,9 @@
|
|||||||
import { render, screen } from '@testing-library/react';
|
import { render, screen } from '@testing-library/react';
|
||||||
|
import '@testing-library/jest-dom';
|
||||||
import App from './App';
|
import App from './App';
|
||||||
|
|
||||||
test('renders without crashing', () => {
|
test('renders app header', () => {
|
||||||
render(<App />);
|
render(<App />);
|
||||||
|
const headerElement = screen.getByText(/Employee Request System/i);
|
||||||
|
expect(headerElement).toBeInTheDocument();
|
||||||
});
|
});
|
10
frontend/src/index.js
Normal file
10
frontend/src/index.js
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import ReactDOM from 'react-dom/client';
|
||||||
|
import App from './App';
|
||||||
|
|
||||||
|
const root = ReactDOM.createRoot(document.getElementById('root'));
|
||||||
|
root.render(
|
||||||
|
<React.StrictMode>
|
||||||
|
<App />
|
||||||
|
</React.StrictMode>
|
||||||
|
);
|
Reference in New Issue
Block a user