Skip to content

Commit

Permalink
32-mockup-a-landing-page-for-ai-graphr-website (#33)
Browse files Browse the repository at this point in the history
docs: update RELEASES.md for improved clarity in release instructions
feat(client): add jest.setup.ts for enhanced testing environment
configuration
fix(client): add setupFilesAfterEnv to jest.config.ts for proper test
setup

feat(tests): enhance testing setup by adding MantineProvider for
consistent theming in tests
fix(Hero): replace HTML entity with JSX escape for apostrophe in text
style(tailwind): standardize quotes in tailwind.config.js for
consistency
style(jest.config): format jest.config.ts for improved readability and
consistency

style(e2e, jest): adjust indentation for consistency and readability in
setup and teardown files, and update jest configuration files to follow
a uniform style

style(jest): standardize indentation in Jest configuration files for
consistency
feat(package.json): add @testing-library/jest-dom dependency for
improved testing capabilities

style(tsconfig.base.json): format JSON structure for better readability
and maintainability
  • Loading branch information
codemile authored Aug 22, 2024
1 parent 2fe6669 commit 1cd2af6
Show file tree
Hide file tree
Showing 108 changed files with 2,445 additions and 2,550 deletions.
15 changes: 14 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,23 @@ root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false

[*.yaml]
indent_size = 2

[*.yml]
indent_size = 2

[*.sh]
indent_size = 2

[*.json]
indent_size = 2
31 changes: 20 additions & 11 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
"ignorePatterns": [
"**/*"
],
"extends": [
"plugin:prettier/recommended",
"prettier"
],
"plugins": [
"@nx"
"@nx",
"prettier"
],
"overrides": [
{
Expand All @@ -29,6 +34,12 @@
}
]
}
],
"prettier/prettier": [
"error",
{
"endOfLine": "auto"
}
]
}
},
Expand All @@ -40,7 +51,12 @@
"extends": [
"plugin:@nx/typescript"
],
"rules": {}
"rules": {
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-namespace": "off"
}
},
{
"files": [
Expand All @@ -53,15 +69,8 @@
"rules": {}
},
{
"files": [
"*.spec.ts",
"*.spec.tsx",
"*.spec.js",
"*.spec.jsx"
],
"env": {
"jest": true
},
"files": "*.json",
"parser": "jsonc-eslint-parser",
"rules": {}
}
]
Expand Down
10 changes: 9 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
{
"singleQuote": true
"semi": true,
"singleQuote": true,
"bracketSpacing": false,
"tabWidth": 4,
"useTabs": false,
"trailingComma": "none",
"arrowParens": "always",
"jsxSingleQuote": false,
"jsxBracketSameLine": false
}
6 changes: 3 additions & 3 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ This document provides instructions on how to perform releases for this project

These commands will:

- Prepare the release but skip the publishing step.
- Build the necessary components.
- Publish the release.
- Prepare the release but skip the publishing step.
- Build the necessary components.
- Publish the release.

Please note that these instructions are for local release. For automated releases, refer to the GitHub Actions workflow defined in `.github/workflows/release.yml`.
58 changes: 20 additions & 38 deletions apps/client-e2e/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,22 @@
{
"extends": [
"plugin:playwright/recommended",
"../../.eslintrc.json"
],
"ignorePatterns": [
"!**/*"
],
"overrides": [
{
"files": [
"*.ts",
"*.tsx",
"*.js",
"*.jsx"
],
"rules": {}
},
{
"files": [
"*.ts",
"*.tsx"
],
"rules": {}
},
{
"files": [
"*.js",
"*.jsx"
],
"rules": {}
},
{
"files": [
"src/**/*.{ts,js,tsx,jsx}"
],
"rules": {}
}
]
"extends": ["plugin:playwright/recommended", "../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
},
{
"files": ["src/**/*.{ts,js,tsx,jsx}"],
"rules": {}
}
]
}
68 changes: 34 additions & 34 deletions apps/client-e2e/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { workspaceRoot } from '@nx/devkit';
import { nxE2EPreset } from '@nx/playwright/preset';
import { defineConfig, devices } from '@playwright/test';
import {workspaceRoot} from '@nx/devkit';
import {nxE2EPreset} from '@nx/playwright/preset';
import {defineConfig, devices} from '@playwright/test';

// For CI, you may want to set BASE_URL to the deployed application.
const baseURL = process.env['BASE_URL'] || 'http://localhost:4200';
Expand All @@ -15,38 +15,38 @@ const baseURL = process.env['BASE_URL'] || 'http://localhost:4200';
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
...nxE2EPreset(__filename, { testDir: './src' }),
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
baseURL,
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry'
},
/* Run your local dev server before starting the tests */
webServer: {
command: 'yarn nx serve client',
url: 'http://localhost:4200',
reuseExistingServer: !process.env.CI,
cwd: workspaceRoot
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] }
...nxE2EPreset(__filename, {testDir: './src'}),
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
baseURL,
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry'
},

{
name: 'firefox',
use: { ...devices['Desktop Firefox'] }
/* Run your local dev server before starting the tests */
webServer: {
command: 'yarn nx serve client',
url: 'http://localhost:4200',
reuseExistingServer: !process.env.CI,
cwd: workspaceRoot
},
projects: [
{
name: 'chromium',
use: {...devices['Desktop Chrome']}
},

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

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

// Uncomment for mobile browsers support
/* {
// Uncomment for mobile browsers support
/* {
name: 'Mobile Chrome',
use: { ...devices['Pixel 5'] },
},
Expand All @@ -55,14 +55,14 @@ export default defineConfig({
use: { ...devices['iPhone 12'] },
}, */

// Uncomment for branded browsers
/* {
// Uncomment for branded browsers
/* {
name: 'Microsoft Edge',
use: { ...devices['Desktop Edge'], channel: 'msedge' },
},
{
name: 'Google Chrome',
use: { ...devices['Desktop Chrome'], channel: 'chrome' },
} */
]
]
});
16 changes: 7 additions & 9 deletions apps/client-e2e/project.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{
"name": "client-e2e",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"sourceRoot": "apps/client-e2e/src",
"implicitDependencies": [
"client"
],
"// targets": "to see all targets run: nx show project client-e2e --web",
"targets": {}
"name": "client-e2e",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"sourceRoot": "apps/client-e2e/src",
"implicitDependencies": ["client"],
"// targets": "to see all targets run: nx show project client-e2e --web",
"targets": {}
}
10 changes: 5 additions & 5 deletions apps/client-e2e/src/example.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { expect, test } from '@playwright/test';
import {expect, test} from '@playwright/test';

test('has title', async ({ page }) => {
await page.goto('/');
test('has title', async ({page}) => {
await page.goto('/');

// Expect h1 to contain a substring.
expect(await page.locator('h1').innerText()).toContain('Welcome');
// Expect h1 to contain a substring.
expect(await page.locator('h1').innerText()).toContain('Welcome');
});
34 changes: 17 additions & 17 deletions apps/client-e2e/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"allowJs": true,
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"sourceMap": false
},
"include": [
"**/*.ts",
"**/*.js",
"playwright.config.ts",
"src/**/*.spec.ts",
"src/**/*.spec.js",
"src/**/*.test.ts",
"src/**/*.test.js",
"src/**/*.d.ts"
]
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"allowJs": true,
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"sourceMap": false
},
"include": [
"**/*.ts",
"**/*.js",
"playwright.config.ts",
"src/**/*.spec.ts",
"src/**/*.spec.js",
"src/**/*.test.ts",
"src/**/*.test.js",
"src/**/*.d.ts"
]
}
Loading

0 comments on commit 1cd2af6

Please sign in to comment.