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

Commit 1b930c6

Browse files
Merge pull request #900 from Bandwidth/DX-2844
DX-2844 Cypress Tests Subheading Links
2 parents 973e9e9 + 2e1c6f6 commit 1b930c6

File tree

3 files changed

+39
-27
lines changed

3 files changed

+39
-27
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import {testSubheadingLink} from '../../utils/utils'
2+
3+
context('Bridge Target Complete - Expected Response Subheading', () => {
4+
testSubheadingLink('/docs/voice/webhooks/bridgeTargetComplete/', 'Expected Response', '#expected-response')
5+
})
6+
7+
context('Disconnect - Expected Response Subheading', () => {
8+
testSubheadingLink('/docs/voice/webhooks/disconnect/', 'Expected Response', '#expected-response')
9+
})
10+
11+
context('Disconnect - Expected Response Subheading', () => {
12+
testSubheadingLink('/docs/voice/bxml/forward/', 'Webhooks Received', '#webhooks-received')
13+
})
14+
15+
context('Disconnect - Expected Response Subheading', () => {
16+
testSubheadingLink('/docs/voice/bxml/gather/', 'Attributes', '#attributes')
17+
})
18+
19+
context('Disconnect - Expected Response Subheading', () => {
20+
testSubheadingLink('/docs/messaging/createMessage/', 'The Response', '#the-response')
21+
})
22+
23+

site/cypress/utils/utils.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,3 +215,19 @@ export const testCarousel = (path, length, title) => {
215215
cy.get('[data-cy="carouselSlides"]').should('have.css', 'transform', `matrix(1, 0, 0, 1, -${rollOverOffset + slideWidth}, 0)`);
216216
})
217217
}
218+
219+
export const testSubheadingLink = (path, text, href) => {
220+
before(() => {
221+
cy.visit(`${path}`);
222+
})
223+
it('tests the subheading links', () => {
224+
cy.get('a')
225+
.contains(`${text}`)
226+
.should('have.attr', 'href', `${href}`)
227+
228+
cy.get('h2')
229+
.contains(`${text}`)
230+
.children(0)
231+
.should('have.attr', 'href', `${href}`)
232+
});
233+
}

site/specs/numbers.yml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -544,65 +544,38 @@ components:
544544
allOf:
545545
- $ref:'#/components/schemas/StringPatch'
546546
description: Put unit, suite, floor, etc. here.
547-
allOf:
548-
- $ref:'#/components/schemas/StringPatch'
549-
description: Put unit, suite, floor, etc. here.
550547
City:
551548
allOf:
552549
- $ref:'#/components/schemas/StringPatch'
553550
description: City.
554-
allOf:
555-
- $ref:'#/components/schemas/StringPatch'
556-
description: City.
557551
County:
558552
allOf:
559553
- $ref:#/components/schemas/StringPatch'
560554
description: The county where the subscriber or business is located.
561-
allOf:
562-
- $ref:#/components/schemas/StringPatch'
563-
description: The county where the subscriber or business is located.
564555
HouseNumber:
565556
allOf:
566557
- $ref:'#/components/schemas/StringPatch'
567558
description: Street address number.
568-
allOf:
569-
- $ref:'#/components/schemas/StringPatch'
570-
description: Street address number.
571559
HousePrefix:
572560
allOf:
573561
- $ref: '#/components/schemas/StringPatch'
574562
description: Street address number prefix.
575-
allOf:
576-
- $ref: '#/components/schemas/StringPatch'
577-
description: Street address number prefix.
578563
HouseSuffix:
579564
allOf:
580565
- $ref:#/components/schemas/StringPatch'
581566
description: Street address number suffix.
582-
allOf:
583-
- $ref:#/components/schemas/StringPatch'
584-
description: Street address number suffix.
585567
PlusFour:
586568
allOf:
587569
- $ref:'#/components/schemas/StringPatch'
588570
description: Zip + 4 value.
589-
allOf:
590-
- $ref:'#/components/schemas/StringPatch'
591-
description: Zip + 4 value.
592571
PostDirectional:
593572
allOf:
594573
- $ref:#/components/schemas/StringPatch'
595574
description: Street address post directional.
596-
allOf:
597-
- $ref:#/components/schemas/StringPatch'
598-
description: Street address post directional.
599575
PreDirectional:
600576
allOf:
601577
- $ref:'#/components/schemas/StringPatch'
602578
description: Street address pre-directional.
603-
allOf:
604-
- $ref:'#/components/schemas/StringPatch'
605-
description: Street address pre-directional.
606579
StateCode:
607580
allOf:
608581
- $ref:'#/components/schemas/StringPatch'

0 commit comments

Comments
 (0)