From a5b0c67574622955739e4c7d9c31decbd4d0aae4 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 10 Jan 2023 07:51:13 -0500 Subject: [PATCH 1/3] DX-2844 Cypress Tests Subheading Links --- site/cypress/e2e/tests/subheading.cy.js | 23 +++++++++++++++++++++++ site/cypress/utils/utils.js | 16 ++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 site/cypress/e2e/tests/subheading.cy.js diff --git a/site/cypress/e2e/tests/subheading.cy.js b/site/cypress/e2e/tests/subheading.cy.js new file mode 100644 index 000000000..0a41b0188 --- /dev/null +++ b/site/cypress/e2e/tests/subheading.cy.js @@ -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') + }) + + diff --git a/site/cypress/utils/utils.js b/site/cypress/utils/utils.js index e706bcd11..cd96f910f 100644 --- a/site/cypress/utils/utils.js +++ b/site/cypress/utils/utils.js @@ -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 things', () => { + cy.get('a') + .contains(`${text}`) + .should('have.attr', 'href', `${href}`) + + cy.get('h2') + .contains(`${text}`) + .children(0) + .should('have.attr', 'href', `${href}`) + }); +} From 67a070307a51e755de9cdaf722521929edafcd59 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 10 Jan 2023 14:09:46 -0500 Subject: [PATCH 2/3] Update site/cypress/utils/utils.js Co-authored-by: Cameron Koegel <53310569+ckoegel@users.noreply.github.com> --- site/cypress/utils/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/cypress/utils/utils.js b/site/cypress/utils/utils.js index cd96f910f..d23cb672b 100644 --- a/site/cypress/utils/utils.js +++ b/site/cypress/utils/utils.js @@ -220,7 +220,7 @@ export const testSubheadingLink = (path, text, href) => { before(() => { cy.visit(`${path}`); }) - it('tests the things', () => { + it('tests the subheading links', () => { cy.get('a') .contains(`${text}`) .should('have.attr', 'href', `${href}`) From 2e1c6f60f591412134b6dfeb59cb42219f306560 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 10 Jan 2023 14:40:00 -0500 Subject: [PATCH 3/3] Update numbers.yml --- site/specs/numbers.yml | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/site/specs/numbers.yml b/site/specs/numbers.yml index 49ce1443c..e26ef9a0a 100644 --- a/site/specs/numbers.yml +++ b/site/specs/numbers.yml @@ -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'