Skip to content

Commit

Permalink
test(#37): 🧪 Write test for sprint 1 code
Browse files Browse the repository at this point in the history
  • Loading branch information
kleinc committed Oct 20, 2025
1 parent 4af9107 commit a3d2d03
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
25 changes: 25 additions & 0 deletions cypress/e2e/shadedLighting.cy.js
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()
cy.get('#chkEDLEnabled').check()
})

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()
})
})
50 changes: 50 additions & 0 deletions cypress/e2e/viewAttribute.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
describe('View Attribute', () => {
it('Places the view attribute', () => {
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()
})

it('Delete view attribute ', 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 attribute 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 attributes ', 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('#tools img[data-i18n="[title]tt.point_measurement"]').click()
cy.get('#potree_render_area canvas[tabindex="2222"]').click()
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()
})
})

0 comments on commit a3d2d03

Please sign in to comment.