-
-
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.
## Summary This PR establishes the foundation for end-to-end (E2E) testing in our project by integrating Playwright. It's a crucial step towards building a tested and stable application, focusing on simplifying our setup to kickstart the testing process effectively. ## Changes - **Integrated Playwright:** Sets up Playwright for E2E testing, enabling us to begin automating tests for our application. - **Codebase Cleanup:** Removed unused files and dependencies to facilitate a smoother build process and ensure the testing environment is focused only on active features. - **Preparation for Feature Reintegration:** This cleanup paves the way for a structured reintroduction of features, ensuring each is thoroughly tested before becoming part of the main codebase again. ## Rationale Following a significant refactor and restructuring of our source code, this move is aimed at ensuring the new structure not only supports development mode but is also testable and buildable. By starting with a lean codebase, we aim to methodically reintroduce features, ensuring each is compatible with our new structure and passes E2E tests. ## Next Steps With the testing framework in place, we will gradually reintroduce features, testing each thoroughly to maintain the integrity and stability of our application. ### Issues Closed - closes #22
- Loading branch information
Showing
26 changed files
with
177 additions
and
3,850 deletions.
There are no files selected for viewing
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.