Skip to content

Commit

Permalink
v1866: v0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MuTsunTsai committed Nov 25, 2024
2 parents 4addc31 + 9556ad8 commit ebf22f7
Show file tree
Hide file tree
Showing 38 changed files with 1,517 additions and 1,275 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: 💬 Discussions
url: https://github.com/MuTsunTsai/box-pleating-studio/discussions
url: https://github.com/bp-studio/box-pleating-studio/discussions
about: Do you have questions or need any help? Use Discussions instead!
7 changes: 3 additions & 4 deletions e2e/specs/bpstudio.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ test.beforeEach(async ({ page }) => {

test("Basic UI", async ({ page }) => {
await expect(page).toHaveTitle(/Box Pleating Studio/);
const menu = page.getByRole("menubar");
await expect(menu).toBeInViewport();
await expect(menu.getByRole("menuitem").first()).not.toBeDisabled();
const studio = new StudioPage(page);
await studio.initialized();
await expect(page.getByRole("toolbar")).toBeInViewport();
await expect(page.getByRole("complementary")).toBeAttached(); // <aside>
await expect(page.getByRole("contentinfo")).toBeAttached(); // <footer>
Expand Down Expand Up @@ -41,7 +40,7 @@ test("Basic history", async ({ page }) => {
await studio.newProject();
await studio.mouse.click(10, 7);
await page.getByRole("button", { name: "Add leaf" }).click();
await page.keyboard.press("Control+z");
await page.keyboard.press("Control+z"); // Undo
await expect(page.getByText("Vertices: 1 / 3")).toBeInViewport();
await page.keyboard.press("2");
await expect(page.getByText("Flaps: 2")).toBeInViewport();
Expand Down
1 change: 1 addition & 0 deletions e2e/specs/editing.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { expect, test } from "@playwright/test";
import { StudioPage } from "../utils";

test.beforeEach(async ({ page }) => {
// Guan-Yu
await page.goto("/?project=XQAAAQAWFgAAAAAAAAA9iIrGlFOQhqZjfSU05W1sTbrXj2O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IzxWz_upOC3UvqmAu8TUJo7m2R-QqRQcWrmdIkOTrAGKk88VpQ7hLndZClWA2EdZOigFhG_arlLM9WRK8ZQCvjN1E1Q_PM-tyNqxbWMw7GB3iWYmHtD3oLRPbZO8Q9fNmUNY9kWaLKKygiSYv3FOEmTtN2jhdmFuiTqHPwveJKkJC36klBLc-0ReJ4bsAHAI31r0F1s0JO_zlw4tsu4SagO2y27fHes30RDKMxxLsjEQ3JQPf_hUvQtCNwoB__VdCDg");
});

Expand Down
22 changes: 22 additions & 0 deletions e2e/specs/settings.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { expect, test } from "@playwright/test";

import { StudioPage } from "../utils";

test("Migration from v0.6 settings", async ({ page }) => {
await page.goto("/");
await page.evaluate(setLocalStorage);
await page.reload();
const studio = new StudioPage(page);
await studio.initialized();
const storage = structuredClone(await page.evaluate(() => window.localStorage));
const settings = JSON.parse(storage.settings);
expect(settings).toHaveProperty("display");
});

function setLocalStorage(): void {
localStorage.setItem("build", "1800");
localStorage.setItem("last_log", "20230928");
localStorage.setItem("locale", "en");
localStorage.setItem("session", `{"jsons":[],"open":-1}`);
localStorage.setItem("settings", `{"autoSave":true,"showDPad":true,"theme":"system","loadSessionOnQueue":false,"hotkey":{"v":{"t":"1","l":"2","zi":"X","zo":"Z"},"m":{"u":"W","d":"S","l":"A","r":"D"},"d":{"ri":"E","rd":"Q","hi":"sW","hd":"sS","wi":"sD","wd":"sA"},"n":{"d":"\\t","cn":"T","cp":"R","pn":"G","pp":"F"}},"showAxialParallel":true,"showGrid":true,"showHinge":true,"showRidge":true,"showLabel":true,"showDot":true,"showStatus":true,"colorScheme":{},"CP":{"reorient":false},"includeHiddenElement":false}`);
}
7 changes: 4 additions & 3 deletions e2e/specs/startup.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { expect, test } from "@playwright/test";

import { StudioPage } from "../utils";

test.describe("JavaScript disabled", () => {
test.use({ javaScriptEnabled: false });

Expand Down Expand Up @@ -31,9 +33,8 @@ test.describe("Network failure", () => {
}
});
await page.goto("/");
const menu = page.getByRole("menubar");
await expect(menu).toBeInViewport();
await expect(menu.getByRole("menuitem").first()).not.toBeDisabled();
const studio = new StudioPage(page);
await studio.initialized();
expect(retry).toBeTruthy();
});
});
6 changes: 6 additions & 0 deletions e2e/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ export class StudioPage {
});
}

public async initialized(): Promise<void> {
const menu = this.page.getByRole("menubar");
await expect(menu).toBeInViewport();
await expect(menu.getByRole("menuitem").first()).not.toBeDisabled();
}

/** Create a new project and wait for the workspace to be ready. */
public async newProject(): Promise<void> {
await this.page.getByRole("menuitem", { name: "File" }).click();
Expand Down
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ export default [
"Object.fromEntries",
"ObjectConstructor.fromEntries",
"PromiseConstructor.withResolvers",
"scheduler",
],
},
},
Expand Down
47 changes: 24 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "box-pleating-studio",
"version": "0.7.0",
"app_version": "1862",
"app_version": "1866",
"description": "Super-complex origami design made easy!",
"keywords": [
"origami",
Expand Down Expand Up @@ -42,39 +42,39 @@
},
"devDependencies": {
"@aaroon/workbox-rspack-plugin": "^0.3.2",
"@eslint/compat": "^1.2.2",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.14.0",
"@eslint/compat": "^1.2.3",
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.15.0",
"@intlify/vue-i18n-extensions": "^6.2.0",
"@mutsuntsai/esbuild-plugin-vue": "^0.1.6",
"@mutsuntsai/stylistic": "^1.0.3",
"@playwright/test": "^1.48.2",
"@rsbuild/core": "^1.1.0",
"@rsbuild/plugin-assets-retry": "^1.0.4",
"@playwright/test": "^1.49.0",
"@rsbuild/core": "^1.1.4",
"@rsbuild/plugin-assets-retry": "^1.0.5",
"@rsbuild/plugin-check-syntax": "^1.1.0",
"@rsbuild/plugin-sass": "^1.1.0",
"@rsbuild/plugin-vue": "^1.0.4",
"@rsbuild/plugin-sass": "^1.1.1",
"@rsbuild/plugin-vue": "^1.0.5",
"@rsdoctor/rspack-plugin": "^0.4.8",
"@swc/core": "^1.9.2",
"@swc/core": "^1.9.3",
"@types/bootstrap": "^5.2.10",
"@types/chai": "^5.0.1",
"@types/gtag.js": "^0.0.20",
"@types/gulp": "^4.0.17",
"@types/mocha": "^10.0.9",
"@types/node": "^22.9.0",
"@types/mocha": "^10.0.10",
"@types/node": "^22.9.3",
"@types/wicg-file-system-access": "^2023.10.5",
"chai": "^5.1.2",
"del": "^8.0.0",
"esbuild": "^0.24.0",
"eslint": "^9.14.0",
"eslint": "^9.15.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-compat": "^6.0.1",
"eslint-plugin-html": "^8.1.2",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsdoc": "^50.4.3",
"eslint-plugin-jsdoc": "^50.5.0",
"eslint-plugin-mocha": "^10.5.0",
"eslint-plugin-typescript-compat": "^1.0.2",
"eslint-plugin-vue": "^9.30.0",
"eslint-plugin-vue": "^9.31.0",
"fancy-log": "^2.0.0",
"find-cache-dir": "^5.0.0",
"global-jsdom": "^25.0.0",
Expand All @@ -90,14 +90,15 @@
"gulp-vue-ssg": "^1.2.4",
"html-minifier-loader": "^1.4.1",
"ifdef-loader": "^2.3.2",
"inquirer": "^12.0.1",
"inquirer": "^12.1.0",
"jsdom": "^25.0.1",
"markdown-loader": "^8.0.0",
"mocha": "^10.8.2",
"mocha-suppress-logs": "^0.5.1",
"nyc": "^17.1.0",
"postcss-preset-env": "^10.0.9",
"postcss-preset-env": "^10.1.1",
"purgecss": "^6.0.0",
"scheduler-polyfill": "^1.3.0",
"stylelint": "^16.10.0",
"stylelint-config-clean-order": "^6.1.0",
"stylelint-config-recommended-vue": "^1.5.0",
Expand All @@ -106,15 +107,15 @@
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"ttf2woff2": "^6.0.1",
"typescript": "^5.6.3",
"typescript-eslint": "^8.13.0",
"typescript": "^5.7.2",
"typescript-eslint": "^8.15.0",
"vinyl-ftp": "^0.6.1",
"vue-eslint-parser": "^9.4.3",
"yaml": "^2.6.0",
"yaml": "^2.6.1",
"yargs": "^17.7.2"
},
"dependencies": {
"@fortawesome/fontawesome-free": "^6.6.0",
"@fortawesome/fontawesome-free": "^6.7.1",
"@paypal/paypal-js": "^8.1.2",
"@pixi/core": "^7.4.2",
"@pixi/events": "^7.4.2",
Expand All @@ -126,8 +127,8 @@
"idb-keyval": "^6.2.1",
"lzma": "^2.3.2",
"probably-china": "^1.0.0",
"pyodide": "^0.26.3",
"vue": "^3.5.12",
"pyodide": "^0.26.4",
"vue": "^3.5.13",
"vue-i18n": "^10.0.4",
"vue-slicksort": "^2.0.5",
"workbox-broadcast-update": "^7.3.0",
Expand Down
Loading

0 comments on commit ebf22f7

Please sign in to comment.