-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from TDT4290-group-4/dev
Sprint 2
- Loading branch information
Showing
36 changed files
with
86,329 additions
and
1,006 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| ### Issue number | ||
|
|
||
| Closes # | ||
|
|
||
| ### Description | ||
|
|
||
| <!-- What does this PR do? Briefly describe the changes and their purpose. --> | ||
|
|
||
| ### Testing steps | ||
|
|
||
| <!-- Describe how reviewers can test your changes (commands, steps, or setup instructions). --> | ||
|
|
||
| ### Screenshots (optional) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,13 @@ | ||
| stages: | ||
| - lint | ||
| name: Prettier | ||
|
|
||
| prettier: | ||
| stage: lint | ||
| image: node:20 | ||
| script: | ||
| - npm ci | ||
| - npx prettier --check . | ||
| on: [pull_request] | ||
| jobs: | ||
| prettier: | ||
| runs-on: self-hosted | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
| - run: npm ci | ||
| - run: npx prettier --check . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| import { defineConfig } from 'cypress' | ||
|
|
||
| export default defineConfig({ | ||
| e2e: { | ||
| setupNodeEvents(on, config) { | ||
| // implement node event listeners here | ||
| } | ||
| }, | ||
| trashAssetsBeforeRuns: false | ||
| }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| // This is demo test | ||
| describe('demo test', () => { | ||
| it('passes', () => { | ||
| cy.visit('http://localhost:5173/#') | ||
| cy.contains('Molloy Explorer') | ||
| cy.contains('Repeat').click() | ||
| }) | ||
| }) | ||
|
|
||
| describe('demo test 2', () => { | ||
| it('passes', () => { | ||
| cy.visit('http://localhost:5173/#') | ||
| cy.get( | ||
| '#elevation_gradient_scheme_selection span:nth-child(1) rect' | ||
| ).click() | ||
| }) | ||
| }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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('#doAcceptedFiltering').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() | ||
| }) | ||
| }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| describe('Globe Rendering and Interaction Test', () => { | ||
| it('Check that the viewer 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 with the globe', () => { | ||
| cy.visit('http://localhost:5173/#') | ||
| cy.wait(6000) | ||
|
|
||
| cy.window({ timeout: 20000 }).its('cesiumViewer').should('exist') | ||
| cy.get('#cesiumContainer').should('exist') | ||
| }) | ||
| }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| describe('Measurement tool', () => { | ||
| it('Places the measurement point', () => { | ||
| cy.visit('http://localhost:5173/#') | ||
|
|
||
| cy.get('#tools img[data-i18n="[title]tt.point_measurement"]').click() | ||
| cy.get('#potree_render_area canvas[tabindex="2222"]').click() | ||
|
|
||
| // Verify measurement was created | ||
| cy.get('#scene_object_properties').should('be.visible') | ||
| cy.get('#g_point_body').children().should('have.length.at.least', 1) | ||
| }) | ||
|
|
||
| it('Delete measurement point', function () { | ||
| cy.visit('http://localhost:5173/#') | ||
|
|
||
| cy.get('#tools img[data-i18n="[title]tt.point_measurement"]').click() | ||
| cy.get('#potree_render_area canvas[tabindex="2222"]').click() | ||
| cy.get('#scene_object_properties [name="remove"]').click() | ||
| cy.get('#tools img[data-i18n="[title]tt.point_measurement"]').click() | ||
| cy.get('#potree_render_area canvas[tabindex="2222"]').click() | ||
| cy.get('#g_point_body button.m-row-delete').click() | ||
| }) | ||
|
|
||
| it('Copy measurement point positions', function () { | ||
| cy.visit('http://localhost:5173/#') | ||
| cy.get('#tools img[data-i18n="[title]tt.point_measurement"]').click() | ||
| cy.get('#potree_render_area canvas[tabindex="2222"]').click() | ||
| cy.get('#scene_object_properties [name="copy"]').click() | ||
| }) | ||
|
|
||
| it('Switch between measurement points', function () { | ||
| cy.visit('http://localhost:5173/#') | ||
| // Create three point measurements | ||
| cy.get('#tools img[data-i18n="[title]tt.point_measurement"]').click() | ||
| cy.get('#potree_render_area canvas[tabindex="2222"]').click() | ||
| cy.get('#tools img[data-i18n="[title]tt.point_measurement"]').click() | ||
| cy.get('#potree_render_area canvas[tabindex="2222"]').click() | ||
| cy.get('#tools img[data-i18n="[title]tt.point_measurement"]').click() | ||
| cy.get('#potree_render_area canvas[tabindex="2222"]').click() | ||
| // Switch between the created points | ||
| cy.get('#g_point_body span[title="Point #2"]').click() | ||
| cy.get('#g_point_body div:nth-child(1)').click() | ||
| cy.get('#g_point_body span[title="Point #3"]').click() | ||
| }) | ||
|
|
||
| it('Open and close List of Measurements ', function () { | ||
| cy.visit('http://localhost:5173/#') | ||
|
|
||
| cy.get('#tools img[data-i18n="[title]tt.point_measurement"]').click() | ||
| cy.get('#potree_render_area canvas[tabindex="2222"]').click() | ||
| cy.get('#tools img[data-i18n="[title]tt.point_measurement"]').click() | ||
| cy.get('#potree_render_area canvas[tabindex="2222"]').click() | ||
| cy.get('#measurement_items span.m-group-title').click() | ||
| cy.get('#measurement_items span.m-group-title').click() | ||
| }) | ||
| }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| describe('Shaded Lighting', () => { | ||
| it('Toggle the EDL checkbox on and off', () => { | ||
| cy.visit('http://localhost:5173/#') | ||
| cy.get('#chkEDLEnabled').uncheck().should('not.be.checked') | ||
| cy.get('#chkEDLEnabled').check().should('be.checked') | ||
| }) | ||
|
|
||
| it('Change radius', function () { | ||
| cy.visit('http://localhost:5173/#') | ||
| cy.get('div.potree_container').click() | ||
| cy.get('#sldEDLRadius span.ui-corner-all').click() | ||
| }) | ||
|
|
||
| it('Change strength', function () { | ||
| cy.visit('http://localhost:5173/#') | ||
| cy.get('#sldEDLStrength span.ui-corner-all').click() | ||
| cy.get('#sldEDLStrength span.ui-corner-all').click() | ||
| }) | ||
|
|
||
| it('Change opacity', function () { | ||
| cy.visit('http://localhost:5173/#') | ||
| cy.get('#sldEDLOpacity span.ui-corner-all').click() | ||
| cy.get('#sldEDLOpacity span.ui-corner-all').click() | ||
| }) | ||
| }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "name": "Using fixtures to represent data", | ||
| "email": "hello@cypress.io", | ||
| "body": "Fixtures are a great way to mock data for responses to routes" | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| // *********************************************** | ||
| // This example commands.js shows you how to | ||
| // create various custom commands and overwrite | ||
| // existing commands. | ||
| // | ||
| // For more comprehensive examples of custom | ||
| // commands please read more here: | ||
| // https://on.cypress.io/custom-commands | ||
| // *********************************************** | ||
| // | ||
| // | ||
| // -- This is a parent command -- | ||
| // Cypress.Commands.add('login', (email, password) => { ... }) | ||
| // | ||
| // | ||
| // -- This is a child command -- | ||
| // Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) | ||
| // | ||
| // | ||
| // -- This is a dual command -- | ||
| // Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) | ||
| // | ||
| // | ||
| // -- This will overwrite an existing command -- | ||
| // Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| // *********************************************************** | ||
| // This example support/e2e.js is processed and | ||
| // loaded automatically before your test files. | ||
| // | ||
| // This is a great place to put global configuration and | ||
| // behavior that modifies Cypress. | ||
| // | ||
| // You can change the location of this file or turn off | ||
| // automatically serving support files with the | ||
| // 'supportFile' configuration option. | ||
| // | ||
| // You can read more here: | ||
| // https://on.cypress.io/configuration | ||
| // *********************************************************** | ||
|
|
||
| // Import commands.js using ES2015 syntax: | ||
| import './commands' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.