diff --git a/addon/components/hyper-table-v2/manage-columns.ts b/addon/components/hyper-table-v2/manage-columns.ts index 09cf33a7..29b2e032 100644 --- a/addon/components/hyper-table-v2/manage-columns.ts +++ b/addon/components/hyper-table-v2/manage-columns.ts @@ -55,7 +55,8 @@ export default class HyperTableV2ManageColumns extends Component 0 && columnDefinition.position?.sticky) { return; } - const cluster = map.get(columnDefinition.clustering_key); + const key = columnDefinition.clustering_key === 'twitter' ? 'x' : columnDefinition.clustering_key; + const cluster = map.get(key); const manageColumn: ManagedColumn = { definition: columnDefinition, visible: !isEmpty(this.args.handler.columns.find((column) => column?.definition.key === columnDefinition.key)), @@ -63,7 +64,7 @@ export default class HyperTableV2ManageColumns extends Component`); await click('.upf-btn.upf-btn--default'); + // await this.pauseTest(); document.querySelectorAll('.fields-list .field').forEach((element, index) => { // index + 1 because the first column is not visible @@ -109,8 +111,9 @@ module('Integration | Component | hyper-table-v2/manage-columns', function (hook const clusterNames = document.querySelectorAll('.fields-list .cluster-name'); assert.equal(clusterNames[0].textContent?.trim(), 'instagram'); - assert.equal(clusterNames[1].textContent?.trim(), 'youtube'); - assert.expect(5); + assert.equal(clusterNames[1].textContent?.trim(), 'x'); + assert.equal(clusterNames[2].textContent?.trim(), 'youtube'); + assert.expect(7); }); test('it sets the category. as active when user select a category', async function (assert) { @@ -134,9 +137,14 @@ module('Integration | Component | hyper-table-v2/manage-columns', function (hook columnDefinitionsVisible[1].firstElementChild?.getAttribute('data-control-name'), 'column_definition_toggle_checkbox_foo' ); - assert.equal(columnDefinitionsVisible[2].textContent?.trim(), 'youtube'); + assert.equal(columnDefinitionsVisible[2].textContent?.trim(), 'x'); assert.equal( columnDefinitionsVisible[3].firstElementChild?.getAttribute('data-control-name'), + 'column_definition_toggle_checkbox_doe' + ); + assert.equal(columnDefinitionsVisible[4].textContent?.trim(), 'youtube'); + assert.equal( + columnDefinitionsVisible[5].firstElementChild?.getAttribute('data-control-name'), 'column_definition_toggle_checkbox_bar' ); });