Skip to content

Commit

Permalink
Merge branch 'dev' of git.ntnu.no:TDT4290-group-4/MolloyExplorer into…
Browse files Browse the repository at this point in the history
… 37-test-sprint-1-code
  • Loading branch information
kleinc committed Oct 27, 2025
2 parents a3d2d03 + 0a567a2 commit 51c0185
Show file tree
Hide file tree
Showing 20 changed files with 83,697 additions and 1,035 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ npm install
npm run dev
```

Then in a new terminal run the server:

```bash
npm run server
```

Open your browser at <http://localhost:5173> to view the app.

### Build for Production
Expand All @@ -31,3 +37,13 @@ npm run build
```

The built files will be in the `dist/` folder.

## Structure

### The Potree Build

This application is built using Potree as a package, meaning that the potree build is used as a base layer for UI and functionality and built onto by our own code. The add-ons may use, move or manipulate objects from the potree build, referencing the objects by classname or id.

### Updating Potree version

To update the version of Potree that this application uses you must make a build from the official potree app and replace the build folder here with the new one. There is no guarantee that Molloy Explorer is compatible with other versions of potree. Make sure that everything works on the development server before applying this to the production server.
24 changes: 24 additions & 0 deletions cypress/e2e/filtering.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**Testing whether the Accepted components excists or not */
describe('Accepted filtering', () => {
it('test accepted filter button', function () {
cy.visit('http://localhost:5173/#')
cy.get('#doAcceptedFilter').click()
})
})

/**Testing whether the Elevation components excists or not */
describe('Elevation Control', () => {
it('test elevation control', function () {
cy.visit('http://localhost:5173/#')
cy.get('#btnDoElevationControl').click()

cy.get(
'#elevation_gradient_scheme_selection span:nth-child(8) rect'
).click()
cy.get(
'#elevation_gradient_scheme_selection span:nth-child(3) rect'
).click()

cy.get('#sldHeightRange').click()
})
})
29 changes: 29 additions & 0 deletions cypress/e2e/globeRendering.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
describe('Globe Rendering and Interaction Test', () => {
it('Check that the globe is rendered correctly', () => {
cy.visit('http://localhost:5173/#')
cy.wait(6000)

cy.window().then((win) => {
const cv = win.cesiumViewer
expect(cv).to.exist
expect(cv.scene.globe.show).to.equal(true)

expect(cv.scene.imageryLayers.length).to.be.at.least(0)
})
})

it('Render the globe and test interactions', () => {
cy.visit('http://localhost:5173/#')
cy.wait(6000)

cy.window({ timeout: 20000 }).its('cesiumViewer').should('exist')
cy.get('#cesiumContainer').should('exist')
})

it('Test interactions', () => {
cy.visit('http://localhost:5173/#')
cy.wait(500)
cy.get('#potree_render_area canvas[tabindex="2222"]').click()
cy.get('#potree_render_area canvas[tabindex="2222"]').click()
})
})
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
rel="stylesheet"
href="/src/MeasurementControl/measurementsPanel.css"
/>
<link rel="stylesheet" href="/src/AnnotationControl/annotationPanel.css" />
<link rel="stylesheet" href="src/AcceptedFiltering/threePanels.css" />
</head>

<body>
Expand Down
Loading

0 comments on commit 51c0185

Please sign in to comment.