🐛 Fixed duplicate email open rate column when filtering members by open rate

no issue

- email open rate is shown by default so we don't need to add the column a second time when the list is filtered by that data
- added `email_open_rate` to the default columns list so it's ignored when adding any filtered-by columns
This commit is contained in:
Kevin Ansfield 2022-03-17 09:29:15 +00:00
parent b0bd691d52
commit 091ae194bf
3 changed files with 6 additions and 2 deletions

View File

@ -161,7 +161,7 @@ export default class MembersController extends Controller {
}
get filterColumns() {
const defaultColumns = ['name', 'email', 'created_at'];
const defaultColumns = ['name', 'email', 'email_open_rate', 'created_at'];
if (this.feature.get('membersTableStatus')) {
defaultColumns.push('status', 'product');
}

View File

@ -116,7 +116,7 @@
<th data-test-table-column="status">Status</th>
{{/if}}
{{#if (not-eq this.settings.editorDefaultEmailRecipients "disabled")}}
<th data-test-table-column="open_rate">Open rate</th>
<th data-test-table-column="email_open_rate">Open rate</th>
{{/if}}
<th data-test-table-column="location">Location</th>
<th data-test-table-column="created">Created</th>

View File

@ -520,6 +520,10 @@ describe('Acceptance: Members filtering', function () {
expect(findAll('[data-test-list="members-list-item"]').length, '# of filtered member rows - operator is-greater')
.to.equal(4);
// it does not add duplicate column
expect(find('[data-test-table-column="email_open_rate"]')).to.exist;
expect(findAll('[data-test-table-column="email_open_rate"]').length).to.equal(1);
// can clear filter
await fillIn(valueInput, '');
await blur(valueInput);