Skip to content

Commit

Permalink
fix(SAI): update queries on comment generation [beta 1] (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescoBorzi authored Feb 6, 2020
1 parent 0143d2b commit 65b8e40
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ describe('SaiEditorComponent integration tests', () => {
.toEqual(`${name} - On Just Died - Start Attacking`);
expect(page.getDatatableCell(page.EDITOR_DT_SELECTOR, 2, saiColIndex).innerText)
.toEqual(`${name} - On Evade - Flee For Assist`);

page.expectAllQueriesToContain(`${name} - On Aggro - Kill Target`);
page.expectAllQueriesToContain(`${name} - On Just Died - Start Attacking`);
page.expectAllQueriesToContain(`${name} - On Evade - Flee For Assist`);
});
});

Expand Down
3 changes: 3 additions & 0 deletions src/app/shared/modules/sai-editor/sai-editor.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ export class SaiEditorService extends MultiRowComplexKeyEditorService<SmartScrip
this._form.controls.comment.setValue(row.comment);
}
}

this.updateDiffQuery();
this.updateFullQuery();
this.refreshDatatable();
}
}
5 changes: 5 additions & 0 deletions src/app/shared/testing/editor-page-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ export abstract class EditorPageObject<T> extends PageObject<T> {
expect(this.queryPo.diffQueryWrapper.innerText).toContain(expectedQuery);
}

expectAllQueriesToContain(expectedQuery: string) {
this.expectDiffQueryToContain(expectedQuery);
this.expectFullQueryToContain(expectedQuery);
}

expectFullQueryToBeEmpty() {
expect(this.queryPo.fullQueryWrapper.innerText).toEqual('');
}
Expand Down

0 comments on commit 65b8e40

Please sign in to comment.