-
-
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.
- Loading branch information
1 parent
c929141
commit 0a44560
Showing
7 changed files
with
135 additions
and
40 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
33 changes: 33 additions & 0 deletions
33
tools-nodejs/vighnesh153-astro/website/playwright-pdf-generation.config.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,33 @@ | ||
import { defineConfig, devices } from "@playwright/test"; | ||
|
||
/** | ||
* Read environment variables from file. | ||
* https://github.com/motdotla/dotenv | ||
*/ | ||
// require('dotenv').config(); | ||
|
||
/** | ||
* See https://playwright.dev/docs/test-configuration. | ||
*/ | ||
export default defineConfig({ | ||
testDir: "./scripts", | ||
forbidOnly: !!process.env.CI, | ||
reporter: "html", | ||
use: { | ||
baseURL: "http://localhost:4321", | ||
trace: "on-first-retry", | ||
}, | ||
/* Run your local dev server before starting the tests */ | ||
webServer: { | ||
command: "npm run dev", | ||
url: "http://localhost:4321", | ||
reuseExistingServer: !process.env.CI, | ||
}, | ||
|
||
projects: [ | ||
{ | ||
name: "chromium", | ||
use: { ...devices["Desktop Chrome"] }, | ||
}, | ||
], | ||
}); |
Binary file added
BIN
+229 KB
tools-nodejs/vighnesh153-astro/website/public/Vighnesh_Raut_CV_25th_Jan_2025.pdf
Binary file not shown.
20 changes: 20 additions & 0 deletions
20
tools-nodejs/vighnesh153-astro/website/scripts/resume-pdf.spec.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,20 @@ | ||
import { test } from "@playwright/test"; | ||
|
||
test("Generate PDF of Resume", async ({ page, browser }) => { | ||
await page.goto("/resume"); | ||
|
||
await page.pdf({ | ||
path: `./public/${await page.title()}.pdf`, | ||
displayHeaderFooter: false, | ||
landscape: false, | ||
printBackground: true, | ||
format: "A4", | ||
tagged: true, | ||
margin: { | ||
top: 0, | ||
bottom: 0, | ||
left: 0, | ||
right: 0, | ||
}, | ||
}); | ||
}); |
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