mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Cleanup and fix handling of Query Tool Cancel button status. Fixes #3319
This commit is contained in:
committed by
Dave Page
parent
b390c033cf
commit
d53c47e1cf
@@ -228,15 +228,6 @@ describe('ExecuteQuery', () => {
|
||||
done();
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('should disable the cancel button', (done) => {
|
||||
setTimeout(
|
||||
() => {
|
||||
expect(cancelButtonSpy)
|
||||
.toHaveBeenCalledWith('disabled', true);
|
||||
done();
|
||||
}, 0);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when query was cancelled', () => {
|
||||
@@ -333,15 +324,6 @@ describe('ExecuteQuery', () => {
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('should disable the cancel button', (done) => {
|
||||
setTimeout(
|
||||
() => {
|
||||
expect(cancelButtonSpy)
|
||||
.toHaveBeenCalledWith('disabled', true);
|
||||
done();
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('should not login is displayed', (done) => {
|
||||
setTimeout(
|
||||
() => {
|
||||
@@ -406,15 +388,6 @@ describe('ExecuteQuery', () => {
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('should disable the cancel button', (done) => {
|
||||
setTimeout(
|
||||
() => {
|
||||
expect(cancelButtonSpy)
|
||||
.toHaveBeenCalledWith('disabled', true);
|
||||
done();
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('should login is displayed', (done) => {
|
||||
setTimeout(
|
||||
() => {
|
||||
@@ -483,15 +456,6 @@ describe('ExecuteQuery', () => {
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('should disable the cancel button', (done) => {
|
||||
setTimeout(
|
||||
() => {
|
||||
expect(cancelButtonSpy)
|
||||
.toHaveBeenCalledWith('disabled', true);
|
||||
done();
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('should login is not displayed', (done) => {
|
||||
setTimeout(
|
||||
() => {
|
||||
@@ -558,15 +522,6 @@ describe('ExecuteQuery', () => {
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('should disable the cancel button', (done) => {
|
||||
setTimeout(
|
||||
() => {
|
||||
expect(cancelButtonSpy)
|
||||
.toHaveBeenCalledWith('disabled', true);
|
||||
done();
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('should login is displayed', (done) => {
|
||||
setTimeout(
|
||||
() => {
|
||||
@@ -630,15 +585,6 @@ describe('ExecuteQuery', () => {
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('should disable the cancel button', (done) => {
|
||||
setTimeout(
|
||||
() => {
|
||||
expect(cancelButtonSpy)
|
||||
.toHaveBeenCalledWith('disabled', true);
|
||||
done();
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('should login is not displayed', (done) => {
|
||||
setTimeout(
|
||||
() => {
|
||||
@@ -970,14 +916,6 @@ describe('ExecuteQuery', () => {
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('should not disable the cancel button', (done) => {
|
||||
setTimeout(
|
||||
() => {
|
||||
expect(cancelButtonSpy).not
|
||||
.toHaveBeenCalled();
|
||||
done();
|
||||
}, 0);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when cannot reach the Python Server', () => {
|
||||
@@ -1251,15 +1189,6 @@ describe('ExecuteQuery', () => {
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('disable the cancel query button', (done) => {
|
||||
setTimeout(() => {
|
||||
let buttonFlash = $('#btn-cancel-query');
|
||||
|
||||
expect(buttonFlash.prop('disabled')).toEqual(true);
|
||||
done();
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('enable the query tool buttons', (done) => {
|
||||
setTimeout(() => {
|
||||
expect(sqlEditorMock.disable_tool_buttons).toHaveBeenCalledWith(false);
|
||||
@@ -1369,16 +1298,6 @@ describe('ExecuteQuery', () => {
|
||||
done();
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('should disable the cancel button', (done) => {
|
||||
setTimeout(
|
||||
() => {
|
||||
let buttonFlash = $('#btn-cancel-query');
|
||||
|
||||
expect(buttonFlash.prop('disabled')).toEqual(true);
|
||||
done();
|
||||
}, 0);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when error is returned by the server', () => {
|
||||
@@ -1428,16 +1347,6 @@ describe('ExecuteQuery', () => {
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('should disable the cancel button', (done) => {
|
||||
setTimeout(
|
||||
() => {
|
||||
let buttonFlash = $('#btn-cancel-query');
|
||||
|
||||
expect(buttonFlash.prop('disabled')).toEqual(true);
|
||||
done();
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('should not save the state', () => {
|
||||
setTimeout(() => {
|
||||
expect(sqlEditorMock.saveState).not.toHaveBeenCalled();
|
||||
@@ -1496,16 +1405,6 @@ describe('ExecuteQuery', () => {
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('should disable the cancel button', (done) => {
|
||||
setTimeout(
|
||||
() => {
|
||||
let buttonFlash = $('#btn-cancel-query');
|
||||
|
||||
expect(buttonFlash.prop('disabled')).toEqual(true);
|
||||
done();
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('should save the state', () => {
|
||||
setTimeout(() => {
|
||||
expect(sqlEditorMock.saveState).toHaveBeenCalledWith(
|
||||
@@ -1567,16 +1466,6 @@ describe('ExecuteQuery', () => {
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('should disable the cancel button', (done) => {
|
||||
setTimeout(
|
||||
() => {
|
||||
let buttonFlash = $('#btn-cancel-query');
|
||||
|
||||
expect(buttonFlash.prop('disabled')).toEqual(true);
|
||||
done();
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('should not save the state', () => {
|
||||
setTimeout(() => {
|
||||
expect(sqlEditorMock.saveState).not.toHaveBeenCalled();
|
||||
@@ -1641,16 +1530,6 @@ describe('ExecuteQuery', () => {
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('should disable the cancel button', (done) => {
|
||||
setTimeout(
|
||||
() => {
|
||||
let buttonFlash = $('#btn-cancel-query');
|
||||
|
||||
expect(buttonFlash.prop('disabled')).toEqual(true);
|
||||
done();
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('should save the state', () => {
|
||||
setTimeout(() => {
|
||||
expect(sqlEditorMock.saveState).toHaveBeenCalledWith(
|
||||
|
||||
Reference in New Issue
Block a user