Skip to content

Commit

Permalink
Switch identifiers to HTML where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
domoscargin authored and colinrotherham committed Oct 20, 2023
1 parent 3ef5092 commit 9b811a5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class Accordion extends GOVUKFrontendComponent {
if (!$sections.length) {
throw new ElementError({
componentName: 'Accordion',
identifier: `Sections (\`.${this.sectionClass}\`)`
identifier: `Sections (\`<div class="${this.sectionClass}">\`)`
})
}

Expand Down Expand Up @@ -208,7 +208,7 @@ export class Accordion extends GOVUKFrontendComponent {
if (!$header) {
throw new ElementError({
componentName: 'Accordion',
identifier: `Section headers (\`.${this.sectionHeaderClass}\`)`
identifier: `Section headers (\`<div class="${this.sectionHeaderClass}">\`)`
})
}

Expand Down Expand Up @@ -247,7 +247,7 @@ export class Accordion extends GOVUKFrontendComponent {
if (!$span) {
throw new ElementError({
componentName: 'Accordion',
identifier: `Section button (\`.${this.sectionButtonClass}\`)`
identifier: `Section button (\`<span class="${this.sectionButtonClass}">\`)`
})
}

Expand Down Expand Up @@ -414,14 +414,14 @@ export class Accordion extends GOVUKFrontendComponent {
if (!$button) {
throw new ElementError({
componentName: 'Accordion',
identifier: `Section button (\`.${this.sectionButtonClass}\`)`
identifier: `Section button (\`<span class="${this.sectionButtonClass}">\`)`
})
}

if (!$content) {
throw new ElementError({
componentName: 'Accordion',
identifier: `Section content (\`.${this.sectionContentClass}\`)`
identifier: `Section content (\`<div class="${this.sectionContentClass}">\`)`
})
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ describe('/components/accordion', () => {
cause: {
name: 'ElementError',
message:
'Accordion: Sections (`.govuk-accordion__section`) not found'
'Accordion: Sections (`<div class="govuk-accordion__section">`) not found'
}
})
})
Expand All @@ -804,7 +804,7 @@ describe('/components/accordion', () => {
cause: {
name: 'ElementError',
message:
'Accordion: Section headers (`.govuk-accordion__section-header`) not found'
'Accordion: Section headers (`<div class="govuk-accordion__section-header">`) not found'
}
})
})
Expand Down Expand Up @@ -842,7 +842,7 @@ describe('/components/accordion', () => {
cause: {
name: 'ElementError',
message:
'Accordion: Section button (`.govuk-accordion__section-button`) not found'
'Accordion: Section button (`<span class="govuk-accordion__section-button">`) not found'
}
})
})
Expand All @@ -861,7 +861,7 @@ describe('/components/accordion', () => {
cause: {
name: 'ElementError',
message:
'Accordion: Section content (`.govuk-accordion__section-content`) not found'
'Accordion: Section content (`<div class="govuk-accordion__section-content">`) not found'
}
})
})
Expand Down

0 comments on commit 9b811a5

Please sign in to comment.