Skip to content

Commit 65b8e40

Browse files
fix(SAI): update queries on comment generation [beta 1] (#376)
1 parent 0143d2b commit 65b8e40

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

src/app/shared/modules/sai-editor/sai-editor.component.integration.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,10 @@ describe('SaiEditorComponent integration tests', () => {
269269
.toEqual(`${name} - On Just Died - Start Attacking`);
270270
expect(page.getDatatableCell(page.EDITOR_DT_SELECTOR, 2, saiColIndex).innerText)
271271
.toEqual(`${name} - On Evade - Flee For Assist`);
272+
273+
page.expectAllQueriesToContain(`${name} - On Aggro - Kill Target`);
274+
page.expectAllQueriesToContain(`${name} - On Just Died - Start Attacking`);
275+
page.expectAllQueriesToContain(`${name} - On Evade - Flee For Assist`);
272276
});
273277
});
274278

src/app/shared/modules/sai-editor/sai-editor.service.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ export class SaiEditorService extends MultiRowComplexKeyEditorService<SmartScrip
110110
this._form.controls.comment.setValue(row.comment);
111111
}
112112
}
113+
114+
this.updateDiffQuery();
115+
this.updateFullQuery();
113116
this.refreshDatatable();
114117
}
115118
}

src/app/shared/testing/editor-page-object.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@ export abstract class EditorPageObject<T> extends PageObject<T> {
126126
expect(this.queryPo.diffQueryWrapper.innerText).toContain(expectedQuery);
127127
}
128128

129+
expectAllQueriesToContain(expectedQuery: string) {
130+
this.expectDiffQueryToContain(expectedQuery);
131+
this.expectFullQueryToContain(expectedQuery);
132+
}
133+
129134
expectFullQueryToBeEmpty() {
130135
expect(this.queryPo.fullQueryWrapper.innerText).toEqual('');
131136
}

0 commit comments

Comments
 (0)