diff --git a/app/assets/javascripts/govuk_publishing_components/components/details.js b/app/assets/javascripts/govuk_publishing_components/components/details.js index 67345e0020..3b3144681e 100644 --- a/app/assets/javascripts/govuk_publishing_components/components/details.js +++ b/app/assets/javascripts/govuk_publishing_components/components/details.js @@ -1,7 +1,5 @@ -// = require govuk/components/details/details.bundle.js window.GOVUK = window.GOVUK || {} -window.GOVUK.Modules = window.GOVUK.Modules || {} -window.GOVUK.Modules.GovukDetails = window.GOVUKFrontend.Details; +window.GOVUK.Modules = window.GOVUK.Modules || {}; (function (Modules) { function GemDetails ($module) { diff --git a/app/views/govuk_publishing_components/components/_details.html.erb b/app/views/govuk_publishing_components/components/_details.html.erb index ed50663b9e..3f4f347604 100644 --- a/app/views/govuk_publishing_components/components/_details.html.erb +++ b/app/views/govuk_publishing_components/components/_details.html.erb @@ -13,8 +13,8 @@ css_classes << shared_helper.get_margin_bottom details_data_attributes = {} - details_data_attributes[:module] = 'govuk-details gem-details' - details_data_attributes[:module] = 'govuk-details gem-details ga4-event-tracker' unless disable_ga4 + details_data_attributes[:module] = 'gem-details' + details_data_attributes[:module] = 'gem-details ga4-event-tracker' unless disable_ga4 data_attributes ||= {} data_attributes[:details_track_click] = '' diff --git a/spec/components/details_spec.rb b/spec/components/details_spec.rb index 72b36daac6..f55c91b54f 100644 --- a/spec/components/details_spec.rb +++ b/spec/components/details_spec.rb @@ -10,7 +10,7 @@ def component_name "This is more info" end - assert_select "details.gem-c-details[data-module='govuk-details gem-details ga4-event-tracker']" + assert_select "details.gem-c-details[data-module='gem-details ga4-event-tracker']" assert_select ".govuk-details__summary-text[data-ga4-expandable]", text: "Some title" assert_select ".govuk-details__text", text: "This is more info" end