Skip to content

Commit

Permalink
console: Fix e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ryaplots committed Sep 16, 2024
1 parent 58bfbd5 commit 5e10b33
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
8 changes: 4 additions & 4 deletions cypress/e2e/console/gateways/create.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ describe('Gateway create', () => {
cy.findByLabelText('Gateway EUI').type(gateway.eui)
cy.findByRole('button', { name: 'Confirm' }).click()
cy.findByTestId('notification').should('not.exist')
cy.findByLabelText('Claim authentication code').type('12345')
cy.findByLabelText('Owner token').type('12345')
cy.findByLabelText('Gateway ID').type(`eui-${gateway.eui}`)
cy.findByText('Frequency plan')
.parents('div[data-test-id="form-field"]')
Expand Down Expand Up @@ -163,7 +163,7 @@ describe('Gateway create', () => {
cy.findByTestId('notification').should('not.exist')
cy.findByLabelText('Frequency plan').selectOption(gateway.frequency_plan)
cy.findByLabelText('Gateway ID').type(`eui-${gateway.eui}`)
cy.findByLabelText('Claim authentication code').type('12345')
cy.findByLabelText('Owner token').type('12345')
cy.findByRole('button', { name: 'Claim gateway' }).click()
cy.wait('@claim-request').its('request.body').should('deep.equal', expectedRequest)
cy.findByTestId('error-notification').should('not.exist')
Expand All @@ -190,7 +190,7 @@ describe('Gateway create', () => {
cy.findByLabelText('Gateway EUI').type(gateway.eui)
cy.findByRole('button', { name: 'Confirm' }).click()
cy.findByTestId('notification').should('be.visible')
cy.findByLabelText('Claim authentication code').type('12345')
cy.findByLabelText('Owner token').type('12345')
cy.findByLabelText('Gateway ID').type(`eui-${gateway.eui}`)
cy.findByText('Frequency plan')
.parents('div[data-test-id="form-field"]')
Expand Down Expand Up @@ -239,7 +239,7 @@ describe('Gateway create', () => {
cy.findByTestId('notification').should('be.visible')
cy.findByLabelText('Frequency plan').selectOption(gateway.frequency_plan)
cy.findByLabelText('Gateway ID').type(`eui-${gateway.eui}`)
cy.findByLabelText('Claim authentication code').type('12345')
cy.findByLabelText('Owner token').type('12345')
cy.findByRole('button', { name: 'Claim gateway' }).click()
cy.wait('@claim-request').its('request.body').should('deep.equal', expectedRequest)
cy.findByTestId('error-notification').should('not.exist')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const { enabled: gsEnabled, base_url: gsBaseURL } = selectGsConfig()

const m = defineMessages({
claimWarning:
'We detected that your gateway is a <strong>Managed Gateway</strong>. To claim this gateway, please use the claim authentication code printed on the inside of the mounting lid or scan the QR code to claim instantly.',
'We detected that your gateway is a <strong>Managed Gateway</strong>. To claim this gateway, please use the owner token printed on the inside of the mounting lid or scan the QR code to claim instantly.',
})

const initialValues = {
Expand Down
5 changes: 2 additions & 3 deletions pkg/webui/lib/field-description-messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,9 @@ const m = defineMessages({
'Adjust the time that the Network Server schedules class C messages in advance. This is useful for gateways that have a known high latency backhaul, like 3G and satellite.',
updateGtwLocationFromStatusDescription:
'Instead of setting the location manually, you can alternatively choose to update the location of this gateway from status messages. This only works for gateways that send their locations within status messages while using an authenticated connection; gateways connected over UDP are not supported. Please refer to the manual of your gateway model to see whether sending location data is supported.',
claimAuthenticationCodeDescription:
'The claim authentication code is the proof of ownership of the gateway.',
claimAuthenticationCodeDescription: 'The owner token is the proof of ownership of the gateway.',
claimAuthenticationCodeLocation:
'It is typically printed on the box or on the device. For example, for The Things Indoor Gateway, the claim authentication code is the WiFi password printed on the device.',
'It is typically printed on the box or on the gateway. For example, for The Things Indoor Gateway, the owner token is the WiFi password printed on the gateway.',
disablePacketBrokerForwardingDescription:
'When checked, uplink messages received from this gateway will not be forwarded to Packet Broker. This option takes effect only after the gateway reconnects.',
rx1DelayDescription:
Expand Down
6 changes: 3 additions & 3 deletions pkg/webui/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@
"console.containers.gateway-managed-gateway.wifi-profiles.overview.deleteSuccess": "WiFi profile deleted",
"console.containers.gateway-managed-gateway.wifi-profiles.overview.deleteFail": "There was an error and the WiFi profile could not be deleted",
"console.containers.gateway-managed-gateway.wifi-profiles.overview.deleteModalMessage": "The profile will not be applicable to gateways anymore and gateways using this profile might lose connectivity. Please make sure to update the gateway settings before deleting this profile.",
"console.containers.gateway-onboarding-form.gateway-provisioning-form.gateway-claim-form-section.index.claimWarning": "We detected that your gateway is a <strong>Managed Gateway</strong>. To claim this gateway, please use the claim authentication code printed on the inside of the mounting lid or scan the QR code to claim instantly.",
"console.containers.gateway-onboarding-form.gateway-provisioning-form.gateway-claim-form-section.index.claimWarning": "We detected that your gateway is a <strong>Managed Gateway</strong>. To claim this gateway, please use the owner token printed on the inside of the mounting lid or scan the QR code to claim instantly.",
"console.containers.gateway-onboarding-form.gateway-provisioning-form.gateway-registration-form-section.index.requireAuthenticatedConnectionDescription": "Select which information can be seen by other network participants, including {packetBrokerURL}",
"console.containers.gateway-onboarding-form.gateway-provisioning-form.gateway-registration-form-section.index.shareGatewayInfoDescription": "Choose this option eg. if your gateway is powered by {loraBasicStationURL}",
"console.containers.gateway-onboarding-form.gateway-provisioning-form.gateway-registration-form-section.validation-schema.validateEntry": "There must be at least one selected frequency plan ID.",
Expand Down Expand Up @@ -1121,8 +1121,8 @@
"lib.field-description-messages.enforceDutyCycleDescription": "When checked, the Network Server will only schedule messages respecting the duty cycle limitations of the selected frequency plan. Note that you are required by law to respect duty cycle regulations applicable to the physical location of your end device.",
"lib.field-description-messages.scheduleAnytimeDelayDescription": "Adjust the time that the Network Server schedules class C messages in advance. This is useful for gateways that have a known high latency backhaul, like 3G and satellite.",
"lib.field-description-messages.updateGtwLocationFromStatusDescription": "Instead of setting the location manually, you can alternatively choose to update the location of this gateway from status messages. This only works for gateways that send their locations within status messages while using an authenticated connection; gateways connected over UDP are not supported. Please refer to the manual of your gateway model to see whether sending location data is supported.",
"lib.field-description-messages.claimAuthenticationCodeDescription": "The claim authentication code is the proof of ownership of the gateway.",
"lib.field-description-messages.claimAuthenticationCodeLocation": "It is typically printed on the box or on the device. For example, for The Things Indoor Gateway, the claim authentication code is the WiFi password printed on the device.",
"lib.field-description-messages.claimAuthenticationCodeDescription": "The owner token is the proof of ownership of the gateway.",
"lib.field-description-messages.claimAuthenticationCodeLocation": "It is typically printed on the box or on the gateway. For example, for The Things Indoor Gateway, the owner token is the WiFi password printed on the gateway.",
"lib.field-description-messages.disablePacketBrokerForwardingDescription": "When checked, uplink messages received from this gateway will not be forwarded to Packet Broker. This option takes effect only after the gateway reconnects.",
"lib.field-description-messages.rx1DelayDescription": "The amount of time in seconds after an uplink that the downlink window opens.",
"lib.field-description-messages.rx1DelayAbsence": "The default value of 5 seconds will be set by The Things Stack to accommodate for high-latency backhauls and/or Packet Broker.",
Expand Down

0 comments on commit 5e10b33

Please sign in to comment.