1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00

Fix database

This commit is contained in:
MoonTestUse1
2025-01-07 06:58:25 +06:00
parent 668ae80544
commit e14f118f35
6 changed files with 52 additions and 12 deletions

View File

@@ -34,12 +34,9 @@ test-frontend:
cache:
paths:
- frontend/node_modules/
key:
files:
- frontend/package-lock.json
before_script:
- cd frontend
- npm ci
- npm install
script:
- npm run test
rules:

View File

@@ -2,28 +2,31 @@
"name": "employee-request-system-frontend",
"version": "1.0.0",
"description": "Frontend for Employee Request System",
"private": true,
"scripts": {
"start": "react-scripts start",
"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"
},
"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-dom": "^18.2.0",
"react-router-dom": "^6.21.1",
"react-scripts": "5.0.1"
"react-scripts": "5.0.1",
"axios": "^1.6.5"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",

View 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
View 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;

View File

@@ -1,6 +1,9 @@
import { render, screen } from '@testing-library/react';
import '@testing-library/jest-dom';
import App from './App';
test('renders without crashing', () => {
test('renders app header', () => {
render(<App />);
const headerElement = screen.getByText(/Employee Request System/i);
expect(headerElement).toBeInTheDocument();
});

10
frontend/src/index.js Normal file
View 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>
);