diff --git a/lib/engines/content_block_manager/app/assets/javascripts/content_block_manager/modules/copy-embed-code.js b/lib/engines/content_block_manager/app/assets/javascripts/content_block_manager/modules/copy-embed-code.js index bcd9bde1d26..d974c7b7844 100644 --- a/lib/engines/content_block_manager/app/assets/javascripts/content_block_manager/modules/copy-embed-code.js +++ b/lib/engines/content_block_manager/app/assets/javascripts/content_block_manager/modules/copy-embed-code.js @@ -13,6 +13,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {} dd.append(this.copyLink) this.module.append(dd) + this.module.classList.remove('govuk-summary-list__row--no-actions') } CopyEmbedCode.prototype.createLink = function () { diff --git a/lib/engines/content_block_manager/spec/content_block_manager/copy-code.spec.js b/lib/engines/content_block_manager/spec/content_block_manager/copy-code.spec.js index a09c27a8df9..eed626f28f9 100644 --- a/lib/engines/content_block_manager/spec/content_block_manager/copy-code.spec.js +++ b/lib/engines/content_block_manager/spec/content_block_manager/copy-code.spec.js @@ -29,6 +29,12 @@ describe('GOVUK.Modules.CopyEmbedCode', function () { expect(copyLink.textContent).toBe('Copy code') }) + it('should remove the .govuk-summary-list__row--no-actions class', function () { + expect(fixture.classList).not.toContain( + 'govuk-summary-list__row--no-actions' + ) + }) + it('should create and populate a textarea', function () { window.GOVUK.triggerEvent(copyLink, 'click')