Skip to content

Commit

Permalink
test: bumped playwright-arduino package to fix upload tests (#96)
Browse files Browse the repository at this point in the history
* test: bumped playwright-arduino package to fix tests and close simavr process when test ends
  • Loading branch information
pajotg authored Jun 25, 2024
1 parent 8c9ee71 commit eeaa2e5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"devDependencies": {
"@biomejs/biome": "^1.7.2",
"@leaphy-robotics/playwright-arduino": "^1.0.2",
"@leaphy-robotics/playwright-arduino": "^1.0.4",
"@playwright/test": "^1.43.1",
"@sentry/vite-plugin": "^2.16.1",
"@sveltejs/vite-plugin-svelte": "^3.0.2",
Expand Down
4 changes: 2 additions & 2 deletions tests/arduino.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ test.describe.configure({ mode: "serial" });
test.beforeEach(setupArduino);
test.beforeEach(goToHomePage);

test.fixme("Arduino - Blockly upload", async ({ page }) => {
test("Arduino - Blockly upload", async ({ page }) => {
await page.getByText("Leaphy Original").click();
await page.getByText("Original Uno").click();

Expand All @@ -25,7 +25,7 @@ test.fixme("Arduino - Blockly upload", async ({ page }) => {
});
});

test.fixme("Arduino - C++ upload", async ({ page }) => {
test("Arduino - C++ upload", async ({ page }) => {
await page.getByText("Leaphy C++").click();

await page.getByRole("button", { name: "Upload to robot" }).click();
Expand Down
5 changes: 4 additions & 1 deletion tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ test.beforeEach(async ({ context }) => {
});

export async function setupArduino({ page }: PlaywrightTestArgs) {
await setupPlaywrightArduino(page);
let board = await setupPlaywrightArduino(page);
page.once("close", (_) => {
board.stop();
});
}

export async function goToHomePage({ page }: PlaywrightTestArgs) {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -616,10 +616,10 @@
resolved "https://registry.yarnpkg.com/@leaphy-robotics/picotool-wasm/-/picotool-wasm-1.0.3.tgz#9047c984c7c261685f6e88d49c9ed54eaeb29391"
integrity sha512-K3St0eLNVRPXPMZ+o1q/+S46zPFw8PEsTMxYQqiLdjJvbvzGgwOZVWOkqukeEUTLtmdopTxkFksPZxmI+jDyTg==

"@leaphy-robotics/playwright-arduino@^1.0.2":
version "1.0.3"
resolved "https://registry.yarnpkg.com/@leaphy-robotics/playwright-arduino/-/playwright-arduino-1.0.3.tgz#430110f666f2ff4f0e63fa43444236a574b6e9f9"
integrity sha512-X4/tLINRBfJjGrDLGRARnJNNLHdma33gKvQu4yZFDctZXuDdEdveImryzR5veoPEfgfQy+yH9UCNWhnsJWn+jg==
"@leaphy-robotics/playwright-arduino@^1.0.4":
version "1.0.4"
resolved "https://registry.yarnpkg.com/@leaphy-robotics/playwright-arduino/-/playwright-arduino-1.0.4.tgz#678f1fdff9a2bb8c25ef871784f49b6e567daeec"
integrity sha512-jpG6URAVPetUubutUYHZeRDFRzn08G/rs/NqG9cDB48EBjPxLbukDQ5iN3T3ZSvcPwss1GLMx7D/VHTVWcllgQ==
dependencies:
serialport "^12.0.0"

Expand Down

0 comments on commit eeaa2e5

Please sign in to comment.