Skip to content

Commit 1f52fda

Browse files
author
Alyar
committed
small code refactoring
1 parent 3df8872 commit 1f52fda

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

packages/devextreme/js/__internal/grids/grid_core/ai_column/ai_column.integration.test.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const SELECTORS = {
2121

2222
const GRID_CONTAINER_ID = 'gridContainer';
2323

24-
const UNICODE_NBSP = '\u00A0';
24+
const EMPTY_CELL_TEXT = '\u00A0';
2525

2626
const items = [
2727
{ id: 1, name: 'Name 1', value: 10 },
@@ -1836,8 +1836,8 @@ describe('API Methods', () => {
18361836
// click the 'Clear Data' button
18371837
dropDownButton.getList().getItem(2).getElement()?.click();
18381838

1839-
expect(component.getDataCell(0, 3).getText()).toBe(UNICODE_NBSP);
1840-
expect(component.getDataCell(1, 3).getText()).toBe(UNICODE_NBSP);
1839+
expect(component.getDataCell(0, 3).getText()).toBe(EMPTY_CELL_TEXT);
1840+
expect(component.getDataCell(1, 3).getText()).toBe(EMPTY_CELL_TEXT);
18411841
});
18421842

18431843
it('should abort the previous request of the same column', async () => {
@@ -3864,8 +3864,8 @@ describe('AI data', () => {
38643864
],
38653865
});
38663866

3867-
expect(component.getDataCell(0, 3).getText()).toBe(UNICODE_NBSP);
3868-
expect(component.getDataCell(1, 3).getText()).toBe(UNICODE_NBSP);
3867+
expect(component.getDataCell(0, 3).getText()).toBe(EMPTY_CELL_TEXT);
3868+
expect(component.getDataCell(1, 3).getText()).toBe(EMPTY_CELL_TEXT);
38693869

38703870
component.apiColumnOption('myColumn', 'ai.prompt', 'Initial prompt');
38713871
await Promise.resolve();
@@ -3907,8 +3907,8 @@ describe('AI data', () => {
39073907
],
39083908
});
39093909

3910-
expect(component.getDataCell(0, 3).getText()).toBe(UNICODE_NBSP);
3911-
expect(component.getDataCell(1, 3).getText()).toBe(UNICODE_NBSP);
3910+
expect(component.getDataCell(0, 3).getText()).toBe(EMPTY_CELL_TEXT);
3911+
expect(component.getDataCell(1, 3).getText()).toBe(EMPTY_CELL_TEXT);
39123912

39133913
component.getAIPromptEditor().getTextArea().setValue('Initial prompt');
39143914
component.getAIPromptEditor().getApplyButton().getElement().click();
@@ -3968,8 +3968,8 @@ describe('AI data', () => {
39683968
});
39693969

39703970
// check data cells of the first AI column
3971-
expect(component.getDataCell(0, 3).getText()).toBe(UNICODE_NBSP);
3972-
expect(component.getDataCell(1, 3).getText()).toBe(UNICODE_NBSP);
3971+
expect(component.getDataCell(0, 3).getText()).toBe(EMPTY_CELL_TEXT);
3972+
expect(component.getDataCell(1, 3).getText()).toBe(EMPTY_CELL_TEXT);
39733973

39743974
// check data cells of the second AI column
39753975
expect(component.getDataCell(0, 4).getText()).toBe('AI Column 2 - AI Response 1');

0 commit comments

Comments
 (0)