-
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
Showing
10 changed files
with
227 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Playwright Tests | ||
on: | ||
push: | ||
branches: main | ||
pull_request: | ||
branches: main | ||
jobs: | ||
test: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22 | ||
cache: 'pnpm' | ||
- run: pnpm install | ||
- name: Install Playwright Browsers | ||
run: pnpm exec playwright install --with-deps | ||
- name: Run Playwright tests | ||
run: pnpm exec playwright test | ||
- uses: actions/upload-artifact@v4 | ||
if: ${{ !cancelled() }} | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 7 |
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
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,35 @@ | ||
import { defineConfig, devices } from "@playwright/test"; | ||
|
||
export default defineConfig({ | ||
testDir: "./tests", | ||
fullyParallel: true, | ||
forbidOnly: !!process.env.CI, | ||
retries: process.env.CI ? 2 : 0, | ||
workers: process.env.CI ? 1 : undefined, | ||
reporter: "html", | ||
use: { | ||
baseURL: "http://127.0.0.1:5173", | ||
trace: "on-first-retry", | ||
}, | ||
projects: [ | ||
{ | ||
name: "chromium", | ||
use: { ...devices["Desktop Chrome"] }, | ||
}, | ||
|
||
{ | ||
name: "firefox", | ||
use: { ...devices["Desktop Firefox"] }, | ||
}, | ||
|
||
{ | ||
name: "webkit", | ||
use: { ...devices["Desktop Safari"] }, | ||
}, | ||
], | ||
webServer: { | ||
command: "pnpm exec vite dev", | ||
url: "http://127.0.0.1:5173", | ||
reuseExistingServer: !process.env.CI, | ||
}, | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
<script lang="ts"> | ||
import UploadPdf from "$lib/components/UploadPdf.svelte"; | ||
import { preventDefault } from "$lib/util"; | ||
import DownloadOutline from "flowbite-svelte-icons/DownloadOutline.svelte"; | ||
import Button from "flowbite-svelte/Button.svelte"; | ||
import Checkbox from "flowbite-svelte/Checkbox.svelte"; | ||
|
@@ -130,12 +131,13 @@ async function downloadMergedPdf() { | |
>To apply for this position, please fill in all required fields, then click "Download PDF" | ||
to download your application as PDF file and send it to [email protected]</P | ||
> | ||
<form onsubmit={preventDefault(downloadMergedPdf)}> | ||
<div> | ||
<Label>Name</Label> | ||
<Input bind:value={name}></Input> | ||
<Label for="name">Name</Label> | ||
<Input bind:value={name} id="name"></Input> | ||
</div> | ||
{#each pdfs as pdf (pdf.id)} | ||
<UploadPdf bind:file={pdf.file} label={`${pdf.label} (pdf)`} /> | ||
<UploadPdf bind:file={pdf.file} label={`${pdf.label} (pdf)`} id={pdf.id} /> | ||
{/each} | ||
<P>Please check if any of the following apply to your application:</P> | ||
{#each checkboxes as checkbox (checkbox.id)} | ||
|
@@ -144,8 +146,9 @@ async function downloadMergedPdf() { | |
<P>Once you have uploaded all required documents, please click "Download PDF" to download your application as a | ||
file and then send it by email to [email protected]</P> | ||
<Button color="primary" on:click={downloadMergedPdf} disabled={!applicationComplete}> | ||
<Button type="submit" color="primary" on:click={downloadMergedPdf} disabled={!applicationComplete}> | ||
<DownloadOutline /> | ||
Download PDF | ||
</Button> | ||
</form> | ||
</div> |
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,6 @@ | ||
export function preventDefault(fn: (event: Event) => void) { | ||
return function (event: Event) { | ||
event.preventDefault(); | ||
fn.call(this, event); | ||
}; | ||
} |
Oops, something went wrong.