-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'alpha' into feat/unit-tests
- Loading branch information
Showing
27 changed files
with
207 additions
and
3,850 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: Set PR Title to First Commit Message | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
|
||
jobs: | ||
set-pr-title: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
# Fetches the entire commit history so that we can access the first commit | ||
fetch-depth: 0 | ||
|
||
- name: Get first commit message | ||
run: | | ||
# Get the SHA of the first commit in the PR | ||
FIRST_COMMIT_SHA=$(git log --reverse --format="%H" "${{ github.event.pull_request.base.sha }}..HEAD" | head -n 1) | ||
# Get the message of the first commit in the PR | ||
FIRST_COMMIT_MESSAGE=$(git log -n 1 --format=%B "$FIRST_COMMIT_SHA") | ||
echo "FIRST_COMMIT_MESSAGE=$FIRST_COMMIT_MESSAGE" >> $GITHUB_ENV | ||
- name: Update PR title | ||
run: gh pr edit "$PR_NUMBER" --title "$FIRST_COMMIT_MESSAGE" | ||
env: | ||
FIRST_COMMIT_MESSAGE: ${{ env.FIRST_COMMIT_MESSAGE }} | ||
GITHUB_TOKEN: ${{ secrets.PIXELASS_PAT_BLIBLA }} | ||
PR_NUMBER: ${{ github.event.pull_request.number }} |
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
Large diffs are not rendered by default.
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import type { PlaywrightTestConfig } from "@playwright/test"; | ||
|
||
/** | ||
* See https://playwright.dev/docs/test-configuration. | ||
*/ | ||
const config: PlaywrightTestConfig = { | ||
testDir: "./playwright", | ||
}; | ||
|
||
export default config; |
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 type { ElectronApplication, Page } from "@playwright/test"; | ||
import { test, expect } from "@playwright/test"; | ||
import { _electron as electron } from "playwright"; | ||
|
||
let electronApp: ElectronApplication; | ||
let page: Page; | ||
|
||
test.beforeAll(async () => { | ||
// Use package.main | ||
electronApp = await electron.launch({ args: ["."] }); | ||
const isPackaged = await electronApp.evaluate(async ({ app }) => app.isPackaged); | ||
|
||
expect(isPackaged).toBe(false); | ||
}); | ||
|
||
test.afterAll(async () => { | ||
await electronApp.close(); | ||
}); | ||
|
||
test("Renders the first page", async () => { | ||
page = await electronApp.firstWindow(); | ||
const title = await page.title(); | ||
expect(title).toBe("Blibla"); | ||
}); | ||
|
||
test("Allows switching the language", async () => { | ||
page = await electronApp.firstWindow(); | ||
|
||
await expect(page.getByTestId("language-selector-list")).toBeVisible(); | ||
await expect(page.getByText("Deutsch")).toBeVisible(); | ||
await page.getByText("Deutsch").click(); | ||
await expect(page.getByText("Sprache")).toBeVisible(); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.