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 committed Oct 19, 2023
1 parent 53a2a6a commit bbefc16
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 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,7 +414,7 @@ export class Accordion extends GOVUKFrontendComponent {
if (!$button) {
throw new ElementError({
componentName: 'Accordion',
identifier: `Section button (\`.${this.sectionButtonClass}\`)`
identifier: `Section button (\`<span class="${this.sectionButtonClass}">\`)`
})
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ describe('/components/accordion', () => {
).rejects.toEqual({
name: 'ElementError',
message:
'Accordion: Sections (`.govuk-accordion__section`) not found'
'Accordion: Sections (`<div class="govuk-accordion__section">`) not found'
})
})

Expand All @@ -795,7 +795,7 @@ describe('/components/accordion', () => {
).rejects.toEqual({
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 @@ -829,7 +829,7 @@ describe('/components/accordion', () => {
).rejects.toEqual({
name: 'ElementError',
message:
'Accordion: Section button (`.govuk-accordion__section-button`) not found'
'Accordion: Section button (`<span class="govuk-accordion__section-button">`) not found'
})
})

Expand Down

0 comments on commit bbefc16

Please sign in to comment.