DEV: Fix flaky table builder system spec (#25272)
Why this change? The `Table Builder when editing a table when cancelling table creation should close the modal if there are no changes made` system test in `spec/system/table_builder_spec.rb` was flaky. It turns out that when the modal is opened, we have to load some JS/CSS files. While that is happening, the modal is actually not functional and clicking stuff in the footer can actually result in an error. In this case, the `interceptCloseModal` calls the private `_hasChanges` function which then calls `this.spreadsheet.getHeaders()`. When stuff is still loading, `this.spreadsheet` has not been set. As a result we get the following error: ``` Cannot read properties of null (reading 'getHeaders') ``` What does this change do? Why stuff is loading, we will now hide the footer in the modal.
This commit is contained in:
parent
c33a8d658b
commit
7b907ec50a
|
@ -328,6 +328,7 @@ export default class SpreadsheetEditor extends Component {
|
||||||
</:body>
|
</:body>
|
||||||
|
|
||||||
<:footer>
|
<:footer>
|
||||||
|
{{#unless this.loading}}
|
||||||
<div class="primary-actions">
|
<div class="primary-actions">
|
||||||
<DButton
|
<DButton
|
||||||
@label={{this.modalAttributes.insertTable.title}}
|
@label={{this.modalAttributes.insertTable.title}}
|
||||||
|
@ -380,6 +381,8 @@ export default class SpreadsheetEditor extends Component {
|
||||||
</ul>
|
</ul>
|
||||||
</DTooltip>
|
</DTooltip>
|
||||||
</div>
|
</div>
|
||||||
|
{{/unless}}
|
||||||
|
|
||||||
</:footer>
|
</:footer>
|
||||||
</DModal>
|
</DModal>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue