Skip to content

Commit afcdb7e

Browse files
authored
Merge pull request #521 from Lemoncode/vnext
minor updates, updated rubber icon
2 parents 1bf5e60 + 5f87af5 commit afcdb7e

File tree

10 files changed

+190
-18
lines changed

10 files changed

+190
-18
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,7 @@ dist-ssr
2222
*.njsproj
2323
*.sln
2424
*.sw?
25+
/test-results/
26+
/playwright-report/
27+
/blob-report/
28+
/playwright/.cache/

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

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

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

1515
Click to watch the video tutorial:
1616

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

28-
We are working to release a 0.9 version in the coming months.
29-
3028
## Installation
3129

3230
Clone this repository:
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { test, expect } from '@playwright/test';
2+
3+
test('navigates to and verifies MongoDB Designer URL', async ({ page }) => {
4+
await page.goto('');
5+
6+
await page.getByRole('link', { name: 'Launch MongoDB Designer' }).click();
7+
await expect(page).toHaveURL('http://localhost:5173/editor.html');
8+
});

package-lock.json

Lines changed: 94 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@
44
"version": "0.0.0",
55
"type": "module",
66
"scripts": {
7+
"postinstall": "npm run install:e2e-browsers",
8+
"install:e2e-browsers": "npx playwright install",
79
"dev": "vite",
810
"build": "tsc && vite build",
911
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
1012
"preview": "vite preview",
1113
"format": "prettier --write .",
1214
"test": "vitest",
13-
"prepare": "husky install",
14-
"tsc-check": "tsc --noEmit"
15+
"prepare": "husky || \"No need to install husky\"",
16+
"tsc-check": "tsc --noEmit",
17+
"e2e": "playwright test --ui"
1518
},
1619
"dependencies": {
1720
"@lemoncode/fonk": "^1.5.4",
@@ -26,6 +29,7 @@
2629
"react-dom": "^18.2.0"
2730
},
2831
"devDependencies": {
32+
"@playwright/test": "^1.48.1",
2933
"@testing-library/dom": "^9.3.4",
3034
"@testing-library/react": "^14.2.1",
3135
"@types/jest": "^29.5.11",

playwright.config.ts

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
import { defineConfig, devices } from '@playwright/test';
2+
3+
const BASE_URL = 'http://localhost:5173/';
4+
5+
export default defineConfig({
6+
testDir: './e2e',
7+
fullyParallel: true,
8+
forbidOnly: !!process.env.CI,
9+
retries: process.env.CI ? 2 : 0,
10+
workers: process.env.CI ? 1 : undefined,
11+
reporter: 'html',
12+
use: {
13+
baseURL: BASE_URL,
14+
trace: 'on-first-retry',
15+
},
16+
17+
/* Configure projects for major browsers */
18+
projects: [
19+
{
20+
name: 'chromium',
21+
use: { ...devices['Desktop Chrome'] },
22+
},
23+
24+
{
25+
name: 'firefox',
26+
use: { ...devices['Desktop Firefox'] },
27+
},
28+
29+
{
30+
name: 'webkit',
31+
use: { ...devices['Desktop Safari'] },
32+
},
33+
34+
/* Test against mobile viewports. */
35+
// {
36+
// name: 'Mobile Chrome',
37+
// use: { ...devices['Pixel 5'] },
38+
// },
39+
// {
40+
// name: 'Mobile Safari',
41+
// use: { ...devices['iPhone 12'] },
42+
// },
43+
44+
/* Test against branded browsers. */
45+
// {
46+
// name: 'Microsoft Edge',
47+
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
48+
// },
49+
// {
50+
// name: 'Google Chrome',
51+
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
52+
// },
53+
],
54+
/* Run your local dev server before starting the tests */
55+
webServer: {
56+
command: 'npm run dev',
57+
reuseExistingServer: !process.env.CI,
58+
},
59+
});

public/assets/fran-lopez.jpg

25.6 KB
Loading

src/pods/about/members.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,11 @@ export const memberList: Member[] = [
7878
urlLinkedin: 'https://www.linkedin.com/in/deletidev/',
7979
image: './assets/leticia-de-la-osa.jpeg',
8080
},
81+
{
82+
id: '11',
83+
name: 'Fran',
84+
surname: 'López',
85+
urlLinkedin: 'https://linkedin.com/in/francisco-l%C3%B3pez-torres',
86+
image: './assets/fran-lopez.jpg',
87+
},
8188
];

src/pods/edit-table/components/commands/commands.component.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { CommandIconButton } from './command-icon-button';
33
import { FieldVm } from '../../edit-table.vm';
44
import { GUID, GenerateGUID } from '@/core/model';
55
import { isFirstItemInArray, isLastItemInArray } from './commands.business';
6-
import { AddFolder, UpIcon, DownIcon, RemoveIcon } from '@/common/components';
6+
import { AddFolder, UpIcon, DownIcon, TrashIcon } from '@/common/components';
77

88
interface Props {
99
onDeleteField: (fieldId: GUID) => void;
@@ -50,7 +50,7 @@ export const Commands: React.FC<Props> = (props: Props) => {
5050
)}
5151
{isDeleteVisible && (
5252
<CommandIconButton
53-
icon={<RemoveIcon />}
53+
icon={<TrashIcon />}
5454
onClick={() => onDeleteField(field.id)}
5555
ariaLabel={REMOVE_ICON + field.name}
5656
/>

vite.config.ts

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,7 @@ import { defineConfig } from 'vite';
22
import { fileURLToPath, URL } from 'node:url';
33
import react from '@vitejs/plugin-react';
44
import checker from 'vite-plugin-checker';
5-
import type { UserConfig as VitestUserConfigInterface } from 'vitest/config';
6-
7-
const vitestConfig: VitestUserConfigInterface = {
8-
test: {
9-
setupFiles: ['./vitest.setup.ts'],
10-
globals: true,
11-
restoreMocks: true,
12-
environment: 'jsdom',
13-
},
14-
};
5+
import { configDefaults } from 'vitest/config';
156

167
// https://vitejs.dev/config/
178
export default defineConfig({
@@ -24,7 +15,14 @@ export default defineConfig({
2415
},
2516
},
2617
},
27-
test: vitestConfig.test,
18+
test: {
19+
setupFiles: ['./vitest.setup.ts'],
20+
globals: true,
21+
environment: 'jsdom',
22+
restoreMocks: true,
23+
include: ['./src/**/*.spec.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
24+
exclude: [...configDefaults.exclude, 'e2e/*'],
25+
},
2826
resolve: {
2927
alias: {
3028
'@': fileURLToPath(new URL('./src', import.meta.url)),

0 commit comments

Comments
 (0)