Skip to content

Commit

Permalink
playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaMan123 committed Dec 12, 2024
1 parent 0efa5b6 commit 4b74ead
Show file tree
Hide file tree
Showing 11 changed files with 3,826 additions and 4 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Playwright Tests
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest]
timeout-minutes: 5
runs-on: ${{ matrix.os }}
steps:
- name: boost
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install -yq libboost-dev
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium
- name: Run Playwright tests
run: xvfb-run npm test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 7
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml
.DS_Store
Expand All @@ -8,8 +7,13 @@
/bin
/minkowski
/deepnest-*win32-x64
package-lock.json
/output
git_token.rtf
.idea
*.zip
.python-version
node_modules/
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
44 changes: 44 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
export type DeepNestConfig = {
units: "mm" | "inch";
scale: number;
spacing: number;
curveTolerance: number;
clipperScale: number;
rotations: number;
threads: number;
populationSize: number;
mutationRate: number;
placementType: "gravity" | "box" | "convexhull";
mergeLines: boolean;
/**
* ratio of material reduction to laser time. 0 = optimize material only, 1 = optimize laser time only
*/
timeRatio: number;
simplify: boolean;
dxfImportScale: number;
dxfExportScale: number;
endpointTolerance: number;
conversionServer: string;
};

export type SheetPlacement = {
filename: string;
id: number;
rotation: number;
source: number;
x: number;
y: number;
};

export type NestingResult = {
area: number;
fitness: number;
index: number;
mergedLength: number;
selected: boolean;
placements: {
sheet: number;
sheetid: number;
sheetplacements: SheetPlacement[];
}[];
};
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ function createBackgroundWindows() {
app.on('ready', () => {
createMainWindow();
mainWindow.once('ready-to-show', () => {
mainWindow.show();
!process.env.CI && mainWindow.show();
createBackgroundWindows();
})
mainWindow.on('closed', () => {
Expand Down
Loading

0 comments on commit 4b74ead

Please sign in to comment.