Skip to content

Commit

Permalink
fixed remaining broken cypress tests in sensor.data.spec
Browse files Browse the repository at this point in the history
  • Loading branch information
nstclair-cc committed Jun 24, 2024
1 parent ece91bd commit 4f34690
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions cypress/integration/branch/sensor.data.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,25 +89,37 @@ context("Testing Experiment Selection View", () => {
sensorData.getSensorConnectionStatus()
.should('contain.text', 'Connected: Mocked Sensor')
})
it.skip("verifies enabled sensor connection UI", () => {
sensorData.assertRecordButtonStatus('enabled')
it("verifies enabled sensor connection UI", () => {
sensorData.getBackButton().click()
experimentSetup.getExperiment('Schoolyard Investigation', 1).click()
sensorData.getTab('Collect').click()
sensorData.getExperimentOptionsMenu() // gets the click in the helper function
sensorData.selectMenuOption('Connect')
sensorData.getSensorConnectionStatus().contains(sensorLabels.mockSensorLabel)
sensorData.getConnectedSensorValue('Temperature').should('not.contain', '--')
// Not able to get a second sensor value, Temp is enough for now
//
// sensorData.ConnectedSensorValue('Relative Humidity').should('not.contain','--')
// sensorData.getConnectedSensorValue('Light').should('not.contain','--')
})
it.skip("disconnects from mock sensor and verify UI", () => {
sensorData.getExperimentOptionsMenu().click()
it("disconnects from mock sensor and verify UI", () => {
sensorData.getBackButton().click()
experimentSetup.getExperiment('Schoolyard Investigation', 1).click()
sensorData.getTab('Collect').click()
sensorData.getExperimentOptionsMenu() // gets the click in the helper function
sensorData.selectMenuOption('Connect')
sensorData.getExperimentOptionsMenu()
sensorData.selectMenuOption('Disconnect')

sensorData.getSensorConnectionStatus().contains('No Sensor Connected')
sensorData.getDisconnectSensorStateIcon().should('exist')
sensorData.getDisconnectedSensorValue('Temperature').should('contain', '--')
})
it.skip("collects data from (mock) sensor", () => {
sensorData.getExperimentOptionsMenu().click()
it("collects data from (mock) sensor", () => {
sensorData.getBackButton().click()
experimentSetup.getExperiment('Schoolyard Investigation', 1).click()
sensorData.getTab('Collect').click()
sensorData.getExperimentOptionsMenu() // gets the click in the helper function
sensorData.selectMenuOption('Connect')

for (let i = 0; i <= 5; i++) {
Expand Down

0 comments on commit 4f34690

Please sign in to comment.