-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test: ✅ add landing snapshot * test: ✅ update snapshots --------- Co-authored-by: Marmicode Bot <[email protected]>
- Loading branch information
Showing
13 changed files
with
83 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,15 +21,16 @@ jobs: | |
with: | ||
bun-version: latest | ||
- name: Install Playwright Browsers | ||
run: bunx playwright install chrome --with-deps | ||
run: bunx playwright install chromium --with-deps | ||
- run: bun install --frozen-lockfile --ignore-scripts | ||
- uses: nrwl/nx-set-shas@v4 | ||
|
||
- run: bunx nx affected e2e -u | ||
- run: bunx nx affected --target e2e --update-snapshots | ||
|
||
- run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Marmicode Bot" | ||
git add apps/*/e2e/**/*.png | ||
git diff --cached --quiet || git commit -a -m "test: ✅ update snapshots" | ||
git push | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"recommendations": ["ms-playwright.playwright"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { test, expect } from '@playwright/test'; | ||
|
||
test('landing layout', async ({ page }) => { | ||
await page.goto('/'); | ||
|
||
await expect(page).toHaveScreenshot({ | ||
fullPage: true, | ||
}); | ||
}); |
Binary file added
BIN
+126 KB
apps/cookbook/e2e/landing.spec.ts-snapshots/landing-layout-1-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+119 KB
apps/cookbook/e2e/landing.spec.ts-snapshots/landing-layout-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
const nx = require('@nx/eslint-plugin'); | ||
const baseConfig = require('../../eslint.config.js'); | ||
const nx = require('@nx/eslint-plugin'); | ||
const playwright = require('eslint-plugin-playwright'); | ||
|
||
console.log(); | ||
|
||
module.exports = [ | ||
...baseConfig, | ||
...nx.configs['flat/react'], | ||
{ | ||
ignores: ['.docusaurus'], | ||
}, | ||
{ | ||
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'], | ||
// Override or add rules here | ||
rules: {}, | ||
}, | ||
{ | ||
...playwright.configs['flat/recommended'], | ||
files: ['e2e/**/*.ts'], | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { defineConfig, devices } from '@playwright/test'; | ||
import { nxE2EPreset } from '@nx/playwright/preset'; | ||
import { workspaceRoot } from '@nx/devkit'; | ||
|
||
const baseURL = process.env['BASE_URL'] || 'http://localhost:3000'; | ||
|
||
/** | ||
* See https://playwright.dev/docs/test-configuration. | ||
*/ | ||
export default defineConfig({ | ||
...nxE2EPreset(__filename, { testDir: './e2e' }), | ||
/* 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: 'nx start cookbook', | ||
url: 'http://localhost:3000', | ||
reuseExistingServer: !process.env.CI, | ||
cwd: workspaceRoot, | ||
}, | ||
projects: [ | ||
{ | ||
name: 'chromium', | ||
use: { ...devices['Desktop Chrome'] }, | ||
}, | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters