diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 741aefc5..6500780d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ on: jobs: build: - name: Build jupytercad + name: Build jupytergis runs-on: ubuntu-latest steps: @@ -18,7 +18,7 @@ jobs: - name: Install Conda environment with Micromamba uses: mamba-org/setup-micromamba@v1 with: - environment-name: cad + environment-name: gis create-args: >- python=3.9 jupyterlab=4 @@ -46,28 +46,14 @@ jobs: restore-keys: | yarn- - - name: Setup OpenCascade build cache - uses: actions/cache@v2 - with: - path: | - packages/opencascade/lib/jupytercad.opencascade.js - packages/opencascade/lib/jupytercad.opencascade.wasm - packages/opencascade/lib/jupytercad.opencascade.d.ts - packages/opencascade/lib/jupytercad.opencascade.version - key: ${{ hashFiles('packages/opencascade/build.yml') }} - - name: Build the extension shell: bash -l {0} run: | set -eux yarn install yarn dev - jupyter labextension list 2>&1 | grep -ie "jupytercad-core.*OK" - jupyter labextension list 2>&1 | grep -ie "jupytercad-lab.*OK" - - - name: Test import - shell: bash -l {0} - run: python -c "import jupytercad_app" + jupyter labextension list 2>&1 | grep -ie "jupytergis-core.*OK" + jupyter labextension list 2>&1 | grep -ie "jupytergis-lab.*OK" - name: Package the extension shell: bash -l {0} @@ -81,9 +67,8 @@ jobs: with: name: extension-artifacts path: | - python/jupytercad_core/dist/jupytercad* - python/jupytercad_lab/dist/jupytercad* - python/jupytercad_app/dist/jupytercad* + python/jupytergis_core/dist/jupytergis* + python/jupytergis_lab/dist/jupytergis* if-no-files-found: error test_isolated: @@ -109,12 +94,11 @@ jobs: sudo rm -rf $(which node) sudo rm -rf $(which node) - cp ./jupytercad_core/dist/jupytercad*.whl ./jupytercad_lab/dist/jupytercad*.whl ./jupytercad_app/dist/jupytercad*.whl . - python -m pip install "jupyterlab>=4.0.0" jupytercad*.whl + cp ./jupytergis_core/dist/jupytergis*.whl ./jupytergis_lab/dist/jupytergis*.whl . + python -m pip install "jupyterlab>=4.0.0" jupytergis*.whl jupyter labextension list - jupyter labextension list 2>&1 | grep -ie "jupytercad.*OK" - jupyter cad --version + jupyter labextension list 2>&1 | grep -ie "jupytergis.*OK" # jupyterlab.browser_check will fail due to the core extension jupyterlab_pygments. # It does not support lab v4.0.0 #python -m jupyterlab.browser_check --no-chrome-test @@ -135,7 +119,7 @@ jobs: uses: mamba-org/setup-micromamba@v1 with: micromamba-version: '1.5.5-0' - environment-name: cad + environment-name: gis create-args: >- python=3.9 jupyterlab @@ -150,8 +134,8 @@ jobs: shell: bash -l {0} run: | set -eux - cp ./jupytercad_core/dist/jupytercad*.whl ./jupytercad_lab/dist/jupytercad*.whl ./jupytercad_app/dist/jupytercad*.whl . - python -m pip install jupytercad*.whl + cp ./jupytergis_core/dist/jupytergis*.whl ./jupytergis_lab/dist/jupytergis*.whl . + python -m pip install jupytergis*.whl - name: Install dependencies shell: bash -l {0} @@ -182,7 +166,7 @@ jobs: if: always() uses: actions/upload-artifact@v3 with: - name: jupytercad-playwright-tests + name: jupytergis-playwright-tests path: | ui-tests/test-results ui-tests/playwright-report @@ -225,15 +209,15 @@ jobs: shell: bash -l {0} run: | set -eux - cp ./jupytercad_core/dist/jupytercad*.whl ./jupytercad_lab/dist/jupytercad*.whl ./jupytercad_app/dist/jupytercad*.whl . - python -m pip install jupytercad*.whl + cp ./jupytergis_core/dist/jupytergis*.whl ./jupytergis_lab/dist/jupytergis*.whl . + python -m pip install jupytergis*.whl - name: Build the lite site shell: bash -l {0} working-directory: lite run: | set -eux - mkdir -p content && cp ../examples/test.jcad ./content + mkdir -p content && cp ../examples/test.jGIS ./content jupyter lite build --contents content --output-dir dist - name: Upload artifact diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml index 187beb4d..a91c2891 100644 --- a/.github/workflows/check-release.yml +++ b/.github/workflows/check-release.yml @@ -15,7 +15,7 @@ jobs: - name: Install Conda environment with Micromamba uses: mamba-org/setup-micromamba@v1 with: - environment-name: cad + environment-name: gis create-args: >- python=3.9 jupyterlab=4 @@ -33,5 +33,5 @@ jobs: - name: Upload Distributions uses: actions/upload-artifact@v3 with: - name: jupytercad-releaser-dist-${{ github.run_number }} + name: jupytergis-releaser-dist-${{ github.run_number }} path: .jupyter_releaser_checkout/dist diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 8913a3ee..84d885a9 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -19,7 +19,7 @@ jobs: - name: Install Conda environment with Micromamba uses: mamba-org/setup-micromamba@v1 with: - environment-name: cad + environment-name: gis create-args: >- python=3.9 jupyterlab=4.0.12 diff --git a/.github/workflows/update_galata_references.yaml b/.github/workflows/update_galata_references.yaml index 290fcd01..7c772e17 100644 --- a/.github/workflows/update_galata_references.yaml +++ b/.github/workflows/update_galata_references.yaml @@ -46,7 +46,7 @@ jobs: - name: Install Conda environment with Micromamba uses: mamba-org/setup-micromamba@v1 with: - environment-name: cad + environment-name: gis create-args: >- python=3.9 jupyterlab=4 @@ -56,8 +56,8 @@ jobs: shell: bash -l {0} run: | whereis python - cp ./jupytercad_core/dist/jupytercad*.whl ./jupytercad_lab/dist/jupytercad*.whl ./jupytercad_app/dist/jupytercad*.whl . - python -m pip install jupytercad*.whl + cp ./jupytergis_core/dist/jupytergis*.whl ./jupytergis_lab/dist/jupytergis*.whl . + python -m pip install jupytergis*.whl - name: Install dependencies shell: bash -l {0} diff --git a/README.md b/README.md index 37aac37a..6e9b7918 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,3 @@ -# JupyterGIS - A JupyterLab extension for 3D geometry modeling. +# JupyterGIS - A JupyterLab extension for GIS. -[![Lite](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)](https://QuantStack.github.io/jupytergis/) - -JupyterGIS - -## Requirements - -- JupyterLab >= 4.0.0 - -## Installation - -You can install JupyterGIS using conda/mamba: - -```bash -mamba install -c conda-forge jupytergis -``` - -Or using pip: - -```bash -pip install jupytergis -``` - -Once you have installed the extension, you should be able to open and edit `.fcstd` files in JupyterLab. - -## Documentation - -Check out the JupyterGIS documentation on ReadTheDocs! - -## Contributing - -JupyterGIS is an open-source project, and contributions are always welcome. If you would like to contribute to JupyterGIS, please fork the repository and submit a pull request. - -See [CONTRIBUTING](CONTRIBUTING.md) for dev installation instructions. - -## License - -JupyterGIS is licensed under the BSD 3-Clause License. See the LICENSE file for more information. +This is WIP diff --git a/examples/test.jGIS b/examples/test.jGIS new file mode 100644 index 00000000..9a33d4ff --- /dev/null +++ b/examples/test.jGIS @@ -0,0 +1,4 @@ +{ + "layers": [], + "options": {} +} \ No newline at end of file diff --git a/python/jupytergis/jupytercad/__init__.py b/python/jupytergis/jupytergis/__init__.py similarity index 100% rename from python/jupytergis/jupytercad/__init__.py rename to python/jupytergis/jupytergis/__init__.py diff --git a/python/jupytergis_lab/style/base.css b/python/jupytergis_lab/style/base.css index 82d7eab5..df7ca2bf 100644 --- a/python/jupytergis_lab/style/base.css +++ b/python/jupytergis_lab/style/base.css @@ -353,35 +353,6 @@ div.jGIS-toolbar-widget > div.jp-Toolbar-item:last-child { display: none; } -.jGIS-sketcher-SketcherDialog .jp-Dialog-content { - max-width: unset !important; - max-height: unset !important; - width: 75vw; - height: 75vh; -} - -.jGIS-sketcher-Sketcher { - background-color: var(--jp-layout-color2); - border-radius: 5px; - display: flex; - flex-direction: column; -} - -.jGIS-sketcher-Sketcher-Toolbar { - min-height: var(--jp-private-toolbar-height); - width: 100%; - height: 29px; - display: flex; -} - -.jGIS-sketcher-Sketcher-Statusbar { - height: 20px; - position: absolute; - bottom: 0; - right: 5px; - font-size: var(--jp-ui-font-size0); -} - .highlight { background-color: var(--jp-layout-color2) !important; } diff --git a/ui-tests/tests/notebook.spec.ts-snapshots/dark-Notebook-ipynb-cell-0-linux.png b/ui-tests/tests/notebook.spec.ts-snapshots/dark-Notebook-ipynb-cell-0-linux.png index 88ff5cc4..40b5df0b 100644 Binary files a/ui-tests/tests/notebook.spec.ts-snapshots/dark-Notebook-ipynb-cell-0-linux.png and b/ui-tests/tests/notebook.spec.ts-snapshots/dark-Notebook-ipynb-cell-0-linux.png differ diff --git a/ui-tests/tests/notebook.spec.ts-snapshots/dark-Notebook-ipynb-cell-1-linux.png b/ui-tests/tests/notebook.spec.ts-snapshots/dark-Notebook-ipynb-cell-1-linux.png deleted file mode 100644 index 6369886b..00000000 Binary files a/ui-tests/tests/notebook.spec.ts-snapshots/dark-Notebook-ipynb-cell-1-linux.png and /dev/null differ diff --git a/ui-tests/tests/notebook.spec.ts-snapshots/dark-Notebook-ipynb-cell-2-linux.png b/ui-tests/tests/notebook.spec.ts-snapshots/dark-Notebook-ipynb-cell-2-linux.png deleted file mode 100644 index 17b375b0..00000000 Binary files a/ui-tests/tests/notebook.spec.ts-snapshots/dark-Notebook-ipynb-cell-2-linux.png and /dev/null differ diff --git a/ui-tests/tests/notebook.spec.ts-snapshots/dark-Notebook-ipynb-cell-3-linux.png b/ui-tests/tests/notebook.spec.ts-snapshots/dark-Notebook-ipynb-cell-3-linux.png deleted file mode 100644 index c1fb3f07..00000000 Binary files a/ui-tests/tests/notebook.spec.ts-snapshots/dark-Notebook-ipynb-cell-3-linux.png and /dev/null differ diff --git a/ui-tests/tests/notebook.spec.ts-snapshots/light-Notebook-ipynb-cell-0-linux.png b/ui-tests/tests/notebook.spec.ts-snapshots/light-Notebook-ipynb-cell-0-linux.png index 74e18b95..3ff7a571 100644 Binary files a/ui-tests/tests/notebook.spec.ts-snapshots/light-Notebook-ipynb-cell-0-linux.png and b/ui-tests/tests/notebook.spec.ts-snapshots/light-Notebook-ipynb-cell-0-linux.png differ diff --git a/ui-tests/tests/notebook.spec.ts-snapshots/light-Notebook-ipynb-cell-1-linux.png b/ui-tests/tests/notebook.spec.ts-snapshots/light-Notebook-ipynb-cell-1-linux.png deleted file mode 100644 index fb85a5e2..00000000 Binary files a/ui-tests/tests/notebook.spec.ts-snapshots/light-Notebook-ipynb-cell-1-linux.png and /dev/null differ diff --git a/ui-tests/tests/notebook.spec.ts-snapshots/light-Notebook-ipynb-cell-2-linux.png b/ui-tests/tests/notebook.spec.ts-snapshots/light-Notebook-ipynb-cell-2-linux.png deleted file mode 100644 index 117fcf24..00000000 Binary files a/ui-tests/tests/notebook.spec.ts-snapshots/light-Notebook-ipynb-cell-2-linux.png and /dev/null differ diff --git a/ui-tests/tests/notebook.spec.ts-snapshots/light-Notebook-ipynb-cell-3-linux.png b/ui-tests/tests/notebook.spec.ts-snapshots/light-Notebook-ipynb-cell-3-linux.png deleted file mode 100644 index 89975483..00000000 Binary files a/ui-tests/tests/notebook.spec.ts-snapshots/light-Notebook-ipynb-cell-3-linux.png and /dev/null differ diff --git a/ui-tests/tests/sketcher.spec.ts b/ui-tests/tests/sketcher.spec.ts deleted file mode 100644 index 290d4afd..00000000 --- a/ui-tests/tests/sketcher.spec.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { expect, test, galata } from '@jupyterlab/galata'; -import path from 'path'; - -test.use({ autoGoto: false }); - -test.describe('Sketcher test', () => { - let errors = 0; - test.beforeEach(async ({ page, request }) => { - page.setViewportSize({ width: 1920, height: 1080 }); - page.on('console', message => { - if (message.type() === 'error') { - errors += 1; - } - }); - - const content = galata.newContentsHelper(request); - await content.deleteDirectory('/examples'); - await content.uploadDirectory( - path.resolve(__dirname, '../../examples'), - '/examples' - ); - }); - - test.afterEach(async ({ page }) => { - errors = 0; - }); - - test(`Should open the sketcher dialog`, async ({ page }) => { - await page.goto(); - - const fileName = 'test.jcad'; - const fullPath = `examples/${fileName}`; - await page.notebook.openByPath(fullPath); - await page.notebook.activate(fullPath); - await page.locator('div.jGIS-Spinner').waitFor({ state: 'hidden' }); - - await page.waitForTimeout(1000); - if (await page.getByRole('button', { name: 'Ok' }).isVisible()) { - await page.getByRole('button', { name: 'Ok' }).click(); - } - // Close the property panel - await page - .getByRole('tablist', { name: 'alternate sidebar' }) - .getByRole('tab', { name: 'JupyterGIS Control Panel' }) - .click(); - - await page.getByTitle('New Sketch').click(); - const dialog = await page.$('.lm-Widget.lm-Panel.jp-Dialog-content'); - if (dialog) { - expect(await dialog.screenshot()).toMatchSnapshot({ - name: `Sketcher-Display-${fileName}.png`, - maxDiffPixelRatio: 0.01 - }); - } - }); - - test(`Should draw a circle`, async ({ page }) => { - await page.goto(); - - const fileName = 'test.jcad'; - const fullPath = `examples/${fileName}`; - await page.notebook.openByPath(fullPath); - await page.notebook.activate(fullPath); - await page.locator('div.jGIS-Spinner').waitFor({ state: 'hidden' }); - - await page.waitForTimeout(1000); - if (await page.getByRole('button', { name: 'Ok' }).isVisible()) { - await page.getByRole('button', { name: 'Ok' }).click(); - } - // Close the property panel - await page - .getByRole('tablist', { name: 'alternate sidebar' }) - .getByRole('tab', { name: 'JupyterGIS Control Panel' }) - .click(); - - await page.getByTitle('New Sketch').click(); - await page.getByRole('button', { name: 'CIRCLE' }).click(); - await page - .locator('canvas') - .nth(1) - .click({ - position: { - x: 455, - y: 209 - } - }); - await page - .locator('canvas') - .nth(1) - .click({ - position: { - x: 455, - y: 335 - } - }); - const dialog = await page.$('.lm-Widget.lm-Panel.jp-Dialog-content'); - if (dialog) { - expect(await dialog.screenshot()).toMatchSnapshot({ - name: `Sketcher-Circle-${fileName}.png`, - maxDiffPixelRatio: 0.01 - }); - } - }); -}); diff --git a/ui-tests/tests/sketcher.spec.ts-snapshots/Sketcher-Circle-test-jcad-linux.png b/ui-tests/tests/sketcher.spec.ts-snapshots/Sketcher-Circle-test-jcad-linux.png deleted file mode 100644 index 5a477f9b..00000000 Binary files a/ui-tests/tests/sketcher.spec.ts-snapshots/Sketcher-Circle-test-jcad-linux.png and /dev/null differ diff --git a/ui-tests/tests/sketcher.spec.ts-snapshots/Sketcher-Display-test-jcad-linux.png b/ui-tests/tests/sketcher.spec.ts-snapshots/Sketcher-Display-test-jcad-linux.png deleted file mode 100644 index 34a548ba..00000000 Binary files a/ui-tests/tests/sketcher.spec.ts-snapshots/Sketcher-Display-test-jcad-linux.png and /dev/null differ diff --git a/ui-tests/tests/tree.spec.ts b/ui-tests/tests/tree.spec.ts deleted file mode 100644 index 6fa5782d..00000000 --- a/ui-tests/tests/tree.spec.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { expect, test, galata } from '@jupyterlab/galata'; -import path from 'path'; - -test.use({ autoGoto: false }); - -test.describe('Tree UI test', () => { - let errors = 0; - test.beforeEach(async ({ page, request }) => { - page.setViewportSize({ width: 1920, height: 1080 }); - page.on('console', message => { - if (message.type() === 'error') { - errors += 1; - } - }); - - const content = galata.newContentsHelper(request); - await content.deleteDirectory('/examples'); - await content.uploadDirectory( - path.resolve(__dirname, '../../examples'), - '/examples' - ); - }); - - test.afterEach(async ({ page }) => { - errors = 0; - }); - - test(`Should display the object tree`, async ({ page }) => { - await page.goto(); - - const fileName = 'test.jcad'; - const fullPath = `examples/${fileName}`; - await page.notebook.openByPath(fullPath); - await page.notebook.activate(fullPath); - await page.locator('div.jGIS-Spinner').waitFor({ state: 'hidden' }); - - await page.waitForTimeout(1000); - if (await page.getByRole('button', { name: 'Ok' }).isVisible()) { - await page.getByRole('button', { name: 'Ok' }).click(); - } - // Close the property panel - await page - .getByRole('tablist', { name: 'alternate sidebar' }) - .getByRole('tab', { name: 'JupyterGIS Control Panel' }) - .click(); - - await page - .locator('[data-test-id="react-tree-root"] div.jGIS-control-panel-tree') - .nth(0) - .click(); - await page - .locator('[data-test-id="react-tree-root"] div.jGIS-control-panel-tree') - .nth(2) - .click(); - - expect(errors).toBe(0); - const tree = await page.getByRole('region', { - name: 'Objects tree Section' - }); - if (tree) { - expect(await tree.screenshot()).toMatchSnapshot({ - name: `Tree-Display-${fileName}.png`, - maxDiffPixelRatio: 0.01 - }); - } - }); -}); diff --git a/ui-tests/tests/tree.spec.ts-snapshots/Tree-Display-test-jcad-linux.png b/ui-tests/tests/tree.spec.ts-snapshots/Tree-Display-test-jcad-linux.png deleted file mode 100644 index 289d69d1..00000000 Binary files a/ui-tests/tests/tree.spec.ts-snapshots/Tree-Display-test-jcad-linux.png and /dev/null differ diff --git a/ui-tests/tests/ui.spec.ts b/ui-tests/tests/ui.spec.ts index f8e3593b..d8aebe95 100644 --- a/ui-tests/tests/ui.spec.ts +++ b/ui-tests/tests/ui.spec.ts @@ -4,25 +4,7 @@ import path from 'path'; test.use({ autoGoto: false }); test.describe('UI Test', () => { - const fileList = ['test.jcad', '3M_CONNECTOR.STEP', 'fan.stl']; - - test.describe('Extension activation test', () => { - test('should emit an activation console message', async ({ - page, - request - }) => { - const logs: string[] = []; - - page.on('console', message => { - logs.push(message.text()); - }); - - await page.goto(); - - expect(logs.filter(s => s === 'Initializing OCC...')).toHaveLength(1); - expect(logs.filter(s => s === 'Done!')).toHaveLength(1); - }); - }); + const fileList = ['test.jGIS']; test.describe('File operations', () => { test.beforeAll(async ({ request }) => { @@ -80,217 +62,4 @@ test.describe('UI Test', () => { }); } }); - - test.describe('File operator test', () => { - let errors = 0; - test.beforeEach(async ({ page, request }) => { - page.setViewportSize({ width: 1920, height: 1080 }); - page.on('console', message => { - if (message.type() === 'error') { - errors += 1; - } - }); - - const content = galata.newContentsHelper(request); - await content.deleteDirectory('/examples'); - await content.uploadDirectory( - path.resolve(__dirname, '../../examples'), - '/examples' - ); - }); - - test.afterEach(async ({ page }) => { - errors = 0; - }); - - test(`Should be able to add object to scene`, async ({ page }) => { - await page.goto(); - - const fileName = 'test.jcad'; - const fullPath = `examples/${fileName}`; - await page.notebook.openByPath(fullPath); - await page.notebook.activate(fullPath); - await page.locator('div.jGIS-Spinner').waitFor({ state: 'hidden' }); - - await page.waitForTimeout(1000); - if (await page.getByRole('button', { name: 'Ok' }).isVisible()) { - await page.getByRole('button', { name: 'Ok' }).click(); - } - - await page.getByTitle('New Box').click(); - page.locator('input[id^="id-jp-schemaform"][label="Name"]').fill('Foo'); - await page - .locator('div.jp-Dialog-buttonLabel', { - hasText: 'Submit' - }) - .click(); - - await page - .getByRole('tablist', { name: 'main sidebar' }) - .getByRole('tab', { name: 'JupyterGIS Control Panel' }) - .click(); - await page - .getByRole('tablist', { name: 'alternate sidebar' }) - .getByRole('tab', { name: 'JupyterGIS Control Panel' }) - .click(); - - await page.waitForTimeout(1000); - expect(errors).toBe(0); - const main = await page.$('#jp-main-split-panel'); - if (main) { - expect(await main.screenshot()).toMatchSnapshot({ - name: `Operator-Add-${fileName}.png`, - maxDiffPixelRatio: 0.01 - }); - } - }); - - test(`Should be able to remove object`, async ({ page }) => { - await page.goto(); - - const fileName = 'test.jcad'; - const fullPath = `examples/${fileName}`; - await page.notebook.openByPath(fullPath); - await page.notebook.activate(fullPath); - await page.locator('div.jGIS-Spinner').waitFor({ state: 'hidden' }); - await page - .locator('[data-test-id="react-tree-root"]') - .getByText('box2') - .click(); - await page - .locator('[data-test-id="react-tree-root"]') - .getByRole('button') - .nth(1) - .click(); - - await page - .getByRole('tablist', { name: 'main sidebar' }) - .getByRole('tab', { name: 'JupyterGIS Control Panel' }) - .click(); - await page - .getByRole('tablist', { name: 'alternate sidebar' }) - .getByRole('tab', { name: 'JupyterGIS Control Panel' }) - .click(); - - await page.waitForTimeout(1000); - expect(errors).toBe(0); - const main = await page.$('#jp-main-split-panel'); - if (main) { - expect(await main.screenshot()).toMatchSnapshot({ - name: `Operator-Remove-${fileName}.png`, - maxDiffPixelRatio: 0.01 - }); - } - }); - - test(`Should be able to edit object`, async ({ page }) => { - await page.goto(); - - const fileName = 'test.jcad'; - const fullPath = `examples/${fileName}`; - await page.notebook.openByPath(fullPath); - await page.notebook.activate(fullPath); - await page.locator('div.jGIS-Spinner').waitFor({ state: 'hidden' }); - - await page - .locator('[data-test-id="react-tree-root"]') - .getByText('box2') - .click(); - await page - .locator('[data-test-id="react-tree-root"]') - .getByText('Shape') - .click(); - await page.getByLabel('Height*').click(); - await page.getByLabel('Height*').fill('32'); - await page.getByRole('button', { name: 'Submit' }).click(); - - // Deselect object for the screenshot - await page - .locator('[data-test-id="react-tree-root"]') - .getByText('Shape') - .click(); - - // Hide side bars for the screenshot - await page - .getByRole('tablist', { name: 'main sidebar' }) - .getByRole('tab', { name: 'JupyterGIS Control Panel' }) - .click(); - await page - .getByRole('tablist', { name: 'alternate sidebar' }) - .getByRole('tab', { name: 'JupyterGIS Control Panel' }) - .click(); - - await page.waitForTimeout(1000); - expect(errors).toBe(0); - const main = await page.$('#jp-main-split-panel'); - if (main) { - expect(await main.screenshot()).toMatchSnapshot({ - name: `Operator-Edit-${fileName}.png`, - maxDiffPixelRatio: 0.01 - }); - } - }); - - test(`Should be able to do multi selection`, async ({ page }) => { - await page.goto(); - - const fileName = 'test.jcad'; - const fullPath = `examples/${fileName}`; - await page.notebook.openByPath(fullPath); - await page.notebook.activate(fullPath); - await page.locator('div.jGIS-Spinner').waitFor({ state: 'hidden' }); - - // Create a cone - await page.getByTitle('New Cone').click(); - await page.getByLabel('Radius1').click(); - await page.getByLabel('Radius1').fill('15'); - await page.getByLabel('Radius2').click(); - await page.getByLabel('Radius2').fill('5'); - await page.getByLabel('Height').click(); - await page.getByLabel('Height').fill('20'); - await page - .locator('div.jp-Dialog-buttonLabel', { - hasText: 'Submit' - }) - .click(); - - // Select cone - await page - .locator('[data-test-id="react-tree-root"]') - .getByText('Cone') - .click(); - - // Select other shape with ctrl key pressed - await page.keyboard.down('Control'); - await page - .locator('[data-test-id="react-tree-root"]') - .getByText('box2') - .click(); - - let main = await page.$('#jp-main-split-panel'); - if (main) { - expect(await main.screenshot()).toMatchSnapshot({ - name: `MultiSelect-${fileName}.png` - }); - } - - await page.waitForTimeout(1000); - - // Apply a cut operator from the selection - await page.getByTitle('Cut').click(); - await page - .locator('.jp-Dialog-body') - .locator('div.jp-Dialog-buttonLabel', { - hasText: 'Submit' - }) - .click(); - - main = await page.$('#jp-main-split-panel'); - if (main) { - expect(await main.screenshot()).toMatchSnapshot({ - name: `MultiSelect-Cut-${fileName}.png` - }); - } - }); - }); }); diff --git a/ui-tests/tests/ui.spec.ts-snapshots/MultiSelect-Cut-test-jcad-linux.png b/ui-tests/tests/ui.spec.ts-snapshots/MultiSelect-Cut-test-jcad-linux.png deleted file mode 100644 index de884222..00000000 Binary files a/ui-tests/tests/ui.spec.ts-snapshots/MultiSelect-Cut-test-jcad-linux.png and /dev/null differ diff --git a/ui-tests/tests/ui.spec.ts-snapshots/MultiSelect-test-jcad-linux.png b/ui-tests/tests/ui.spec.ts-snapshots/MultiSelect-test-jcad-linux.png deleted file mode 100644 index 84c6bb59..00000000 Binary files a/ui-tests/tests/ui.spec.ts-snapshots/MultiSelect-test-jcad-linux.png and /dev/null differ diff --git a/ui-tests/tests/ui.spec.ts-snapshots/Operator-Add-test-jcad-linux.png b/ui-tests/tests/ui.spec.ts-snapshots/Operator-Add-test-jcad-linux.png deleted file mode 100644 index 5f88f4e4..00000000 Binary files a/ui-tests/tests/ui.spec.ts-snapshots/Operator-Add-test-jcad-linux.png and /dev/null differ diff --git a/ui-tests/tests/ui.spec.ts-snapshots/Operator-Edit-test-jcad-linux.png b/ui-tests/tests/ui.spec.ts-snapshots/Operator-Edit-test-jcad-linux.png deleted file mode 100644 index 0513dae4..00000000 Binary files a/ui-tests/tests/ui.spec.ts-snapshots/Operator-Edit-test-jcad-linux.png and /dev/null differ diff --git a/ui-tests/tests/ui.spec.ts-snapshots/Operator-Remove-test-jcad-linux.png b/ui-tests/tests/ui.spec.ts-snapshots/Operator-Remove-test-jcad-linux.png deleted file mode 100644 index 5f88f4e4..00000000 Binary files a/ui-tests/tests/ui.spec.ts-snapshots/Operator-Remove-test-jcad-linux.png and /dev/null differ diff --git a/ui-tests/tests/ui.spec.ts-snapshots/Render-3M-CONNECTOR-STEP-linux.png b/ui-tests/tests/ui.spec.ts-snapshots/Render-3M-CONNECTOR-STEP-linux.png deleted file mode 100644 index 4f87806d..00000000 Binary files a/ui-tests/tests/ui.spec.ts-snapshots/Render-3M-CONNECTOR-STEP-linux.png and /dev/null differ diff --git a/ui-tests/tests/ui.spec.ts-snapshots/Render-fan-stl-linux.png b/ui-tests/tests/ui.spec.ts-snapshots/Render-fan-stl-linux.png deleted file mode 100644 index 33d8d6e9..00000000 Binary files a/ui-tests/tests/ui.spec.ts-snapshots/Render-fan-stl-linux.png and /dev/null differ diff --git a/ui-tests/tests/ui.spec.ts-snapshots/Render-test-jGIS-linux.png b/ui-tests/tests/ui.spec.ts-snapshots/Render-test-jGIS-linux.png new file mode 100644 index 00000000..24575f30 Binary files /dev/null and b/ui-tests/tests/ui.spec.ts-snapshots/Render-test-jGIS-linux.png differ diff --git a/ui-tests/tests/ui.spec.ts-snapshots/Render-test-jcad-linux.png b/ui-tests/tests/ui.spec.ts-snapshots/Render-test-jcad-linux.png deleted file mode 100644 index 5f88f4e4..00000000 Binary files a/ui-tests/tests/ui.spec.ts-snapshots/Render-test-jcad-linux.png and /dev/null differ