@@ -113,8 +115,10 @@ import ParticipationEvolutionIcon from './participation-evolution-icon';
{{/if}}
-
- |
+ {{#if @campaign.multipleSendings}}
+
+ |
+ {{/if}}
{{#if profile.certifiable}}
{{t "pages.profiles-list.table.column.certifiable"}}
@@ -123,9 +127,11 @@ import ParticipationEvolutionIcon from './participation-evolution-icon';
|
{{profile.certifiableCompetencesCount}}
|
-
- {{profile.sharedProfileCount}}
- |
+ {{#if @campaign.multipleSendings}}
+
+ {{profile.sharedProfileCount}}
+ |
+ {{/if}}
{{/each}}
diff --git a/orga/tests/integration/components/campaign/results/profile-list-test.js b/orga/tests/integration/components/campaign/results/profile-list-test.js
index f21bb7364c9..b800094b288 100644
--- a/orga/tests/integration/components/campaign/results/profile-list-test.js
+++ b/orga/tests/integration/components/campaign/results/profile-list-test.js
@@ -45,8 +45,9 @@ module('Integration | Component | Campaign::Results::ProfileList', function (hoo
assert.ok(screen.getByRole('table', { name: t('pages.profiles-list.table.caption') }));
});
});
- module('table headers for multiple sendings campaign', function () {
- test('it should display evolution header and tooltip and shared profile count when campaign is multiple sendings', async function (assert) {
+
+ module('table headers', function () {
+ test('it should display evolution header with tooltip and shared profile count when campaign is multiple sendings', async function (assert) {
// given
this.campaign = store.createRecord('campaign', {
id: '1',
@@ -156,7 +157,42 @@ module('Integration | Component | Campaign::Results::ProfileList', function (hoo
assert.ok(screen.getByRole('cell', { name: '01/02/2020' }));
});
- test('it should display correct evolution', async function (assert) {
+ test('it should not display evolution if campaign is not multiple sendings', async function (assert) {
+ // given
+ this.campaign = store.createRecord('campaign', {
+ id: '1',
+ name: 'campagne 1',
+ participationsCount: 1,
+ multipleSendings: false,
+ });
+ this.profiles = [
+ {
+ firstName: 'Alice',
+ lastName: 'Red',
+ participantExternalId: '789',
+ evolution: null,
+ sharedAt: new Date(2020, 1, 1),
+ },
+ ];
+ this.profiles.meta = { rowCount: 1 };
+
+ // when
+ const screen = await render(
+ hbs`