Improve display of error messages in the query tool. Fixes #2700

This commit is contained in:
Murtuza Zabuawala
2017-09-20 11:29:14 +01:00
committed by Dave Page
parent fe757c384b
commit 2ddbddba33
2 changed files with 99 additions and 33 deletions

View File

@@ -383,6 +383,45 @@ describe('QueryHistory', () => {
expect(queryDetail.at(0).text()).toContain('third sql statement');
});
});
describe('when a fourth SQL query is executed', () => {
beforeEach(() => {
historyCollection.add({
query: 'fourth sql statement',
start_time: new Date(2017, 12, 12, 1, 33, 5, 99),
status: false,
row_affected: 0,
total_time: '26 msec',
message: 'ERROR: unexpected error from fourth sql message',
});
queryEntries = historyWrapper.find(QueryHistoryEntry);
});
it('displays fourth query SQL in the right pane', () => {
expect(queryDetail.at(0).text()).toContain('Error Message unexpected error from fourth sql message');
});
});
describe('when a fifth SQL query is executed', () => {
beforeEach(() => {
historyCollection.add({
query: 'fifth sql statement',
start_time: new Date(2017, 12, 12, 1, 33, 5, 99),
status: false,
row_affected: 0,
total_time: '26 msec',
message: 'unknown error',
});
queryEntries = historyWrapper.find(QueryHistoryEntry);
});
it('displays fourth query SQL in the right pane', () => {
expect(queryDetail.at(0).text()).toContain('Error Message unknown error');
});
});
});
describe('when several days of queries were executed', () => {