Skip to content

Commit

Permalink
✨ certif: do not allow to close the communication banner
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiaPena committed Dec 4, 2024
1 parent 8575741 commit da21cbf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
2 changes: 1 addition & 1 deletion certif/app/components/communication-banner.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{#if this.isEnabled}}
<PixBannerAlert @type={{this.bannerType}} @canCloseBanner="true">
<PixBannerAlert @type={{this.bannerType}} @canCloseBanner={{false}}>
{{text-with-multiple-lang this.bannerContent}}
</PixBannerAlert>
{{/if}}
16 changes: 0 additions & 16 deletions certif/tests/integration/components/communication-banner-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { render } from '@1024pix/ember-testing-library';
import { click } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
import ENV from 'pix-certif/config/environment';
import { module, test } from 'qunit';
Expand Down Expand Up @@ -39,20 +38,5 @@ module('Integration | Component | communication-banner', function (hooks) {

// then
assert.dom(screen.getByText('information banner text ...')).exists();
assert.dom(screen.getByRole('button', { name: 'Fermer' })).exists();
});

test('should close the information banner on click on close button', async function (assert) {
// given
ENV.APP.BANNER.CONTENT = 'information banner text ...';
ENV.APP.BANNER.TYPE = 'information';
const screen = await render(hbs`<CommunicationBanner />`);

// when
await click(screen.getByRole('button', { name: 'Fermer' }));

// then
assert.dom(screen.queryByText('information banner text ...')).doesNotExist();
assert.dom(screen.queryByRole('button', { name: 'Fermer' })).doesNotExist();
});
});

0 comments on commit da21cbf

Please sign in to comment.