Skip to content

Commit

Permalink
fix test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
NewerKey committed Dec 17, 2024
1 parent 1624398 commit 6a4897c
Show file tree
Hide file tree
Showing 8 changed files with 687 additions and 32 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/create-user-mongo-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,24 @@ on:
email:
description: where to send the email
required: true

jobs:
create-user:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Install dependencies
run: npm install

- name: Create user in MongoDB
run: node createUser.js
env:
MONGO_URI: ${{ secrets.MONGO_URI }}
EMAIL: ${{ github.event.inputs.email }}
13 changes: 5 additions & 8 deletions app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,11 @@ integrations:
token: ${GITLAB_TOKEN}

techdocs:
builder: 'external'
publisher:
type: googleGcs
googleGcs:
bucketName: ${IDP_BUCKET_NAME}
credentials:
$file: ${IDP_CREDENTIALS_FILE}
region: ${DOCS_STORAGE_REGION}
builder: 'local' # Alternatives - 'external'
generator:
runIn: 'docker' # Alternatives - 'local'
publisher:
type: 'local' # Alternatives - 'googleGcs' or 'awsS3'. Read documentation for using alternatives.

##scaffolder:

Expand Down
5 changes: 2 additions & 3 deletions catalog-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ metadata:
name: code-idp
description: CODE-IDP is the platform to automate the deployment process for the projects using nodejs and flask frameworks.
It also enables users to store, view and discover information about projects in CODE.
# Example for optional annotations
# annotations:
# github.com/project-slug: backstage/backstage
annotations:
github.com/project-slug: 'codeuniversity/code-idp'
# backstage.io/techdocs-ref: dir:.
spec:
type: website
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
]
},
"devDependencies": {
"@babel/preset-react": "^7.26.3",
"@backstage/cli": "^0.29.0",
"@backstage/e2e-test-utils": "^0.1.1",
"@playwright/test": "^1.32.3",
Expand Down
5 changes: 5 additions & 0 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"lint": "backstage-cli package lint"
},
"dependencies": {
"@backstage-community/plugin-github-actions": "^0.6.26",
"@backstage/app-defaults": "^1.5.14",
"@backstage/catalog-model": "^1.7.1",
"@backstage/cli": "^0.29.0",
Expand Down Expand Up @@ -41,8 +42,12 @@
"@backstage/plugin-user-settings": "^0.8.16",
"@backstage/theme": "^0.6.2",
"@circleci/backstage-plugin": "^0.1.1",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
"@mui/icons-material": "^6.2.0",
"@mui/material": "^6.2.0",
"history": "^5.0.0",
"react": "^18.0.2",
"react-dom": "^18.0.2",
Expand Down
9 changes: 4 additions & 5 deletions packages/app/src/App.test.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import React from 'react';
import { render, waitFor } from '@testing-library/react';
import App from './App';
import 'jest-canvas-mock'



describe('App', () => {
it('should render', async () => {
Expand All @@ -13,7 +10,7 @@ describe('App', () => {
{
data: {
app: { title: 'Test' },
backend: { baseUrl: 'http://localhost:3000' },
backend: { baseUrl: 'http://localhost:7007' },
techdocs: {
storageUrl: 'http://localhost:7007/api/techdocs/static/docs',
},
Expand All @@ -22,7 +19,9 @@ describe('App', () => {
},
] as any,
};
const rendered = render(<App />);

const rendered = render(<App />);

await waitFor(() => {
expect(rendered.baseElement).toBeInTheDocument();
});
Expand Down
19 changes: 13 additions & 6 deletions packages/app/src/components/Root/Root.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React, { PropsWithChildren } from 'react';
import { makeStyles } from '@material-ui/core';
import HomeIcon from '@material-ui/icons/Home';
import WindowRoundedIcon from '@mui/icons-material/WindowRounded';
import ExtensionIcon from '@material-ui/icons/Extension';
import MapIcon from '@material-ui/icons/MyLocation';
import LibraryBooks from '@material-ui/icons/LibraryBooks';
import CreateComponentIcon from '@material-ui/icons/AddCircleOutline';
import BackupRoundedIcon from '@mui/icons-material/BackupRounded';
import LogoFull from './LogoFull';
import LogoIcon from './LogoIcon';
import {
Expand All @@ -24,8 +24,9 @@ import {
useSidebarOpenState,
Link,
} from '@backstage/core-components';
import MenuIcon from '@material-ui/icons/Menu';
import MenuOpenRoundedIcon from '@mui/icons-material/MenuOpenRounded';
import SearchIcon from '@material-ui/icons/Search';
import AppRegistrationRoundedIcon from '@mui/icons-material/AppRegistrationRounded';

const useSidebarLogoStyles = makeStyles({
root: {
Expand Down Expand Up @@ -63,12 +64,18 @@ export const Root = ({ children }: PropsWithChildren<{}>) => (
<SidebarSearchModal />
</SidebarGroup>
<SidebarDivider />
<SidebarGroup label="Menu" icon={<MenuIcon />}>
<SidebarGroup label="Menu" icon={<MenuOpenRoundedIcon />}>
{/* Global nav, not org-specific */}
<SidebarItem icon={HomeIcon} to="catalog" text="Home" />
<SidebarItem icon={WindowRoundedIcon} to="catalog" text="Home" />
<SidebarItem icon={ExtensionIcon} to="api-docs" text="APIs" />
<SidebarItem icon={LibraryBooks} to="docs" text="Documents" />
<SidebarItem icon={CreateComponentIcon} to="create" text="Create...." />
<SidebarItem icon={BackupRoundedIcon} to="create" text="Deploy" />
<SidebarItem
icon={AppRegistrationRoundedIcon}
to="catalog-import"
text="Register"
/>

{/* End global nav */}
<SidebarDivider />
<SidebarScrollWrapper>
Expand Down
Loading

0 comments on commit 6a4897c

Please sign in to comment.