Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #900 from Bandwidth/DX-2844
Browse files Browse the repository at this point in the history
DX-2844 Cypress Tests Subheading Links
  • Loading branch information
brianluisgomez authored Jan 10, 2023
2 parents 973e9e9 + 2e1c6f6 commit 1b930c6
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 27 deletions.
23 changes: 23 additions & 0 deletions site/cypress/e2e/tests/subheading.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import {testSubheadingLink} from '../../utils/utils'

context('Bridge Target Complete - Expected Response Subheading', () => {
testSubheadingLink('/docs/voice/webhooks/bridgeTargetComplete/', 'Expected Response', '#expected-response')
})

context('Disconnect - Expected Response Subheading', () => {
testSubheadingLink('/docs/voice/webhooks/disconnect/', 'Expected Response', '#expected-response')
})

context('Disconnect - Expected Response Subheading', () => {
testSubheadingLink('/docs/voice/bxml/forward/', 'Webhooks Received', '#webhooks-received')
})

context('Disconnect - Expected Response Subheading', () => {
testSubheadingLink('/docs/voice/bxml/gather/', 'Attributes', '#attributes')
})

context('Disconnect - Expected Response Subheading', () => {
testSubheadingLink('/docs/messaging/createMessage/', 'The Response', '#the-response')
})


16 changes: 16 additions & 0 deletions site/cypress/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,19 @@ export const testCarousel = (path, length, title) => {
cy.get('[data-cy="carouselSlides"]').should('have.css', 'transform', `matrix(1, 0, 0, 1, -${rollOverOffset + slideWidth}, 0)`);
})
}

export const testSubheadingLink = (path, text, href) => {
before(() => {
cy.visit(`${path}`);
})
it('tests the subheading links', () => {
cy.get('a')
.contains(`${text}`)
.should('have.attr', 'href', `${href}`)

cy.get('h2')
.contains(`${text}`)
.children(0)
.should('have.attr', 'href', `${href}`)
});
}
27 changes: 0 additions & 27 deletions site/specs/numbers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -544,65 +544,38 @@ components:
allOf:
- $ref:'#/components/schemas/StringPatch'
description: Put unit, suite, floor, etc. here.
allOf:
- $ref:'#/components/schemas/StringPatch'
description: Put unit, suite, floor, etc. here.
City:
allOf:
- $ref:'#/components/schemas/StringPatch'
description: City.
allOf:
- $ref:'#/components/schemas/StringPatch'
description: City.
County:
allOf:
- $ref:#/components/schemas/StringPatch'
description: The county where the subscriber or business is located.
allOf:
- $ref:#/components/schemas/StringPatch'
description: The county where the subscriber or business is located.
HouseNumber:
allOf:
- $ref:'#/components/schemas/StringPatch'
description: Street address number.
allOf:
- $ref:'#/components/schemas/StringPatch'
description: Street address number.
HousePrefix:
allOf:
- $ref: '#/components/schemas/StringPatch'
description: Street address number prefix.
allOf:
- $ref: '#/components/schemas/StringPatch'
description: Street address number prefix.
HouseSuffix:
allOf:
- $ref:#/components/schemas/StringPatch'
description: Street address number suffix.
allOf:
- $ref:#/components/schemas/StringPatch'
description: Street address number suffix.
PlusFour:
allOf:
- $ref:'#/components/schemas/StringPatch'
description: Zip + 4 value.
allOf:
- $ref:'#/components/schemas/StringPatch'
description: Zip + 4 value.
PostDirectional:
allOf:
- $ref:#/components/schemas/StringPatch'
description: Street address post directional.
allOf:
- $ref:#/components/schemas/StringPatch'
description: Street address post directional.
PreDirectional:
allOf:
- $ref:'#/components/schemas/StringPatch'
description: Street address pre-directional.
allOf:
- $ref:'#/components/schemas/StringPatch'
description: Street address pre-directional.
StateCode:
allOf:
- $ref:'#/components/schemas/StringPatch'
Expand Down

0 comments on commit 1b930c6

Please sign in to comment.