Skip to content

Commit

Permalink
Merge pull request #521 from Lemoncode/vnext
Browse files Browse the repository at this point in the history
minor updates, updated rubber icon
  • Loading branch information
brauliodiez authored Nov 4, 2024
2 parents 1bf5e60 + 5f87af5 commit afcdb7e
Show file tree
Hide file tree
Showing 10 changed files with 190 additions and 18 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ dist-ssr
*.njsproj
*.sln
*.sw?
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

Mongo Modeler is a free, open source online web application that allows you to design and model MongoDB databases.

Now you can take a look at the desktop community preview at [mongomodeler.com](https://mongomodeler.com/).
Give it a try: [mongomodeler.com](https://mongomodeler.com/).

Click to watch the video tutorial:

Expand All @@ -25,8 +25,6 @@ Main features:
- It is a 100% online application, no installation required.
- It is a free and open source application.

We are working to release a 0.9 version in the coming months.

## Installation

Clone this repository:
Expand Down
8 changes: 8 additions & 0 deletions e2e/launch-mongodb-designer-link.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { test, expect } from '@playwright/test';

test('navigates to and verifies MongoDB Designer URL', async ({ page }) => {
await page.goto('');

await page.getByRole('link', { name: 'Launch MongoDB Designer' }).click();
await expect(page).toHaveURL('http://localhost:5173/editor.html');
});
94 changes: 94 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"postinstall": "npm run install:e2e-browsers",
"install:e2e-browsers": "npx playwright install",
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"format": "prettier --write .",
"test": "vitest",
"prepare": "husky install",
"tsc-check": "tsc --noEmit"
"prepare": "husky || \"No need to install husky\"",
"tsc-check": "tsc --noEmit",
"e2e": "playwright test --ui"
},
"dependencies": {
"@lemoncode/fonk": "^1.5.4",
Expand All @@ -26,6 +29,7 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@playwright/test": "^1.48.1",
"@testing-library/dom": "^9.3.4",
"@testing-library/react": "^14.2.1",
"@types/jest": "^29.5.11",
Expand Down
59 changes: 59 additions & 0 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import { defineConfig, devices } from '@playwright/test';

const BASE_URL = 'http://localhost:5173/';

export default defineConfig({
testDir: './e2e',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: 'html',
use: {
baseURL: BASE_URL,
trace: 'on-first-retry',
},

/* Configure projects for major browsers */
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},

{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},

{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},

/* Test against mobile viewports. */
// {
// name: 'Mobile Chrome',
// use: { ...devices['Pixel 5'] },
// },
// {
// name: 'Mobile Safari',
// use: { ...devices['iPhone 12'] },
// },

/* Test against branded browsers. */
// {
// name: 'Microsoft Edge',
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
// },
// {
// name: 'Google Chrome',
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
// },
],
/* Run your local dev server before starting the tests */
webServer: {
command: 'npm run dev',
reuseExistingServer: !process.env.CI,
},
});
Binary file added public/assets/fran-lopez.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/pods/about/members.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,11 @@ export const memberList: Member[] = [
urlLinkedin: 'https://www.linkedin.com/in/deletidev/',
image: './assets/leticia-de-la-osa.jpeg',
},
{
id: '11',
name: 'Fran',
surname: 'López',
urlLinkedin: 'https://linkedin.com/in/francisco-l%C3%B3pez-torres',
image: './assets/fran-lopez.jpg',
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { CommandIconButton } from './command-icon-button';
import { FieldVm } from '../../edit-table.vm';
import { GUID, GenerateGUID } from '@/core/model';
import { isFirstItemInArray, isLastItemInArray } from './commands.business';
import { AddFolder, UpIcon, DownIcon, RemoveIcon } from '@/common/components';
import { AddFolder, UpIcon, DownIcon, TrashIcon } from '@/common/components';

interface Props {
onDeleteField: (fieldId: GUID) => void;
Expand Down Expand Up @@ -50,7 +50,7 @@ export const Commands: React.FC<Props> = (props: Props) => {
)}
{isDeleteVisible && (
<CommandIconButton
icon={<RemoveIcon />}
icon={<TrashIcon />}
onClick={() => onDeleteField(field.id)}
ariaLabel={REMOVE_ICON + field.name}
/>
Expand Down
20 changes: 9 additions & 11 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,7 @@ import { defineConfig } from 'vite';
import { fileURLToPath, URL } from 'node:url';
import react from '@vitejs/plugin-react';
import checker from 'vite-plugin-checker';
import type { UserConfig as VitestUserConfigInterface } from 'vitest/config';

const vitestConfig: VitestUserConfigInterface = {
test: {
setupFiles: ['./vitest.setup.ts'],
globals: true,
restoreMocks: true,
environment: 'jsdom',
},
};
import { configDefaults } from 'vitest/config';

// https://vitejs.dev/config/
export default defineConfig({
Expand All @@ -24,7 +15,14 @@ export default defineConfig({
},
},
},
test: vitestConfig.test,
test: {
setupFiles: ['./vitest.setup.ts'],
globals: true,
environment: 'jsdom',
restoreMocks: true,
include: ['./src/**/*.spec.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
exclude: [...configDefaults.exclude, 'e2e/*'],
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
Expand Down

0 comments on commit afcdb7e

Please sign in to comment.