Skip to content

Commit 6a4897c

Browse files
committed
fix test failures
1 parent 1624398 commit 6a4897c

File tree

8 files changed

+687
-32
lines changed

8 files changed

+687
-32
lines changed

.github/workflows/create-user-mongo-db.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,24 @@ on:
88
email:
99
description: where to send the email
1010
required: true
11+
12+
jobs:
13+
create-user:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v2
18+
19+
- name: Set up Node.js
20+
uses: actions/setup-node@v2
21+
with:
22+
node-version: '14'
23+
24+
- name: Install dependencies
25+
run: npm install
26+
27+
- name: Create user in MongoDB
28+
run: node createUser.js
29+
env:
30+
MONGO_URI: ${{ secrets.MONGO_URI }}
31+
EMAIL: ${{ github.event.inputs.email }}

app-config.yaml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,11 @@ integrations:
3535
token: ${GITLAB_TOKEN}
3636

3737
techdocs:
38-
builder: 'external'
39-
publisher:
40-
type: googleGcs
41-
googleGcs:
42-
bucketName: ${IDP_BUCKET_NAME}
43-
credentials:
44-
$file: ${IDP_CREDENTIALS_FILE}
45-
region: ${DOCS_STORAGE_REGION}
38+
builder: 'local' # Alternatives - 'external'
39+
generator:
40+
runIn: 'docker' # Alternatives - 'local'
41+
publisher:
42+
type: 'local' # Alternatives - 'googleGcs' or 'awsS3'. Read documentation for using alternatives.
4643

4744
##scaffolder:
4845

catalog-info.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ metadata:
55
name: code-idp
66
description: CODE-IDP is the platform to automate the deployment process for the projects using nodejs and flask frameworks.
77
It also enables users to store, view and discover information about projects in CODE.
8-
# Example for optional annotations
9-
# annotations:
10-
# github.com/project-slug: backstage/backstage
8+
annotations:
9+
github.com/project-slug: 'codeuniversity/code-idp'
1110
# backstage.io/techdocs-ref: dir:.
1211
spec:
1312
type: website

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
]
4242
},
4343
"devDependencies": {
44+
"@babel/preset-react": "^7.26.3",
4445
"@backstage/cli": "^0.29.0",
4546
"@backstage/e2e-test-utils": "^0.1.1",
4647
"@playwright/test": "^1.32.3",

packages/app/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"lint": "backstage-cli package lint"
1515
},
1616
"dependencies": {
17+
"@backstage-community/plugin-github-actions": "^0.6.26",
1718
"@backstage/app-defaults": "^1.5.14",
1819
"@backstage/catalog-model": "^1.7.1",
1920
"@backstage/cli": "^0.29.0",
@@ -41,8 +42,12 @@
4142
"@backstage/plugin-user-settings": "^0.8.16",
4243
"@backstage/theme": "^0.6.2",
4344
"@circleci/backstage-plugin": "^0.1.1",
45+
"@emotion/react": "^11.14.0",
46+
"@emotion/styled": "^11.14.0",
4447
"@material-ui/core": "^4.12.2",
4548
"@material-ui/icons": "^4.9.1",
49+
"@mui/icons-material": "^6.2.0",
50+
"@mui/material": "^6.2.0",
4651
"history": "^5.0.0",
4752
"react": "^18.0.2",
4853
"react-dom": "^18.0.2",

packages/app/src/App.test.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import React from 'react';
22
import { render, waitFor } from '@testing-library/react';
33
import App from './App';
4-
import 'jest-canvas-mock'
5-
6-
74

85
describe('App', () => {
96
it('should render', async () => {
@@ -13,7 +10,7 @@ describe('App', () => {
1310
{
1411
data: {
1512
app: { title: 'Test' },
16-
backend: { baseUrl: 'http://localhost:3000' },
13+
backend: { baseUrl: 'http://localhost:7007' },
1714
techdocs: {
1815
storageUrl: 'http://localhost:7007/api/techdocs/static/docs',
1916
},
@@ -22,7 +19,9 @@ describe('App', () => {
2219
},
2320
] as any,
2421
};
25-
const rendered = render(<App />);
22+
23+
const rendered = render(<App />);
24+
2625
await waitFor(() => {
2726
expect(rendered.baseElement).toBeInTheDocument();
2827
});

packages/app/src/components/Root/Root.tsx

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import React, { PropsWithChildren } from 'react';
22
import { makeStyles } from '@material-ui/core';
3-
import HomeIcon from '@material-ui/icons/Home';
3+
import WindowRoundedIcon from '@mui/icons-material/WindowRounded';
44
import ExtensionIcon from '@material-ui/icons/Extension';
55
import MapIcon from '@material-ui/icons/MyLocation';
66
import LibraryBooks from '@material-ui/icons/LibraryBooks';
7-
import CreateComponentIcon from '@material-ui/icons/AddCircleOutline';
7+
import BackupRoundedIcon from '@mui/icons-material/BackupRounded';
88
import LogoFull from './LogoFull';
99
import LogoIcon from './LogoIcon';
1010
import {
@@ -24,8 +24,9 @@ import {
2424
useSidebarOpenState,
2525
Link,
2626
} from '@backstage/core-components';
27-
import MenuIcon from '@material-ui/icons/Menu';
27+
import MenuOpenRoundedIcon from '@mui/icons-material/MenuOpenRounded';
2828
import SearchIcon from '@material-ui/icons/Search';
29+
import AppRegistrationRoundedIcon from '@mui/icons-material/AppRegistrationRounded';
2930

3031
const useSidebarLogoStyles = makeStyles({
3132
root: {
@@ -63,12 +64,18 @@ export const Root = ({ children }: PropsWithChildren<{}>) => (
6364
<SidebarSearchModal />
6465
</SidebarGroup>
6566
<SidebarDivider />
66-
<SidebarGroup label="Menu" icon={<MenuIcon />}>
67+
<SidebarGroup label="Menu" icon={<MenuOpenRoundedIcon />}>
6768
{/* Global nav, not org-specific */}
68-
<SidebarItem icon={HomeIcon} to="catalog" text="Home" />
69+
<SidebarItem icon={WindowRoundedIcon} to="catalog" text="Home" />
6970
<SidebarItem icon={ExtensionIcon} to="api-docs" text="APIs" />
7071
<SidebarItem icon={LibraryBooks} to="docs" text="Documents" />
71-
<SidebarItem icon={CreateComponentIcon} to="create" text="Create...." />
72+
<SidebarItem icon={BackupRoundedIcon} to="create" text="Deploy" />
73+
<SidebarItem
74+
icon={AppRegistrationRoundedIcon}
75+
to="catalog-import"
76+
text="Register"
77+
/>
78+
7279
{/* End global nav */}
7380
<SidebarDivider />
7481
<SidebarScrollWrapper>

0 commit comments

Comments
 (0)