Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Commit 275fddb

Browse files
joshuali925penghuo
authored andcommitted
Update cypress tests and increase delay (#792)
1 parent f093ae0 commit 275fddb

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

workbench/.cypress/integration/ui.spec.js

+5-11
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { delay, testQueries, verifyDownloadData, files } from "../utils/constant
2222
describe('Test PPL UI', () => {
2323
beforeEach(() => {
2424
cy.visit('app/opendistro-query-workbench');
25+
cy.wait(delay);
2526
cy.get('.euiToggle__input[title=PPL]').click();
2627
cy.wait(delay);
2728
});
@@ -58,7 +59,7 @@ describe('Test PPL UI', () => {
5859
expect(editor.getValue()).to.equal('');
5960
});
6061
});
61-
62+
6263
it('Test full screen view', () => {
6364
cy.get('.euiButton__text').contains('Full screen view').should('not.exist');
6465
cy.get('.euiTitle').contains('Query Workbench').should('exist');
@@ -70,7 +71,7 @@ describe('Test PPL UI', () => {
7071
cy.get('.euiButton__text').contains('Full screen view').click();
7172

7273
cy.get('.euiTitle').should('not.exist');
73-
74+
7475
cy.get('button#exit-fullscreen-button').click();
7576
cy.wait(delay);
7677
cy.get('.euiButton__text').contains('Full screen view').should('exist');
@@ -81,6 +82,7 @@ describe('Test PPL UI', () => {
8182
describe('Test SQL UI', () => {
8283
beforeEach(() => {
8384
cy.visit('app/opendistro-query-workbench');
85+
cy.wait(delay);
8486
cy.get('.euiToggle__input[title=SQL]').click();
8587
cy.wait(delay);
8688
});
@@ -128,20 +130,11 @@ describe('Test SQL UI', () => {
128130
cy.get('.euiButton__text').contains('Full screen view').should('not.exist');
129131
cy.get('.euiTitle').contains('Query Workbench').should('exist');
130132

131-
cy.get('textarea.ace_text-input').eq(0).focus().type('{selectall}{backspace}', { force: true });
132-
cy.wait(delay);
133-
cy.get('textarea.ace_text-input').eq(0).focus().type('{selectall}{backspace}select log(balance) from accounts where abs(age) > 20;', { force: true });
134-
cy.wait(delay);
135133
cy.get('.euiButton__text').contains('Run').click();
136134
cy.wait(delay);
137135
cy.get('.euiButton__text').contains('Full screen view').click();
138136

139137
cy.get('.euiTitle').should('not.exist');
140-
141-
cy.get('button#exit-fullscreen-button').click();
142-
cy.wait(delay);
143-
cy.get('.euiButton__text').contains('Full screen view').should('exist');
144-
cy.get('.euiTitle').contains('Query Workbench').should('exist');
145138
});
146139
});
147140

@@ -169,6 +162,7 @@ describe('Test and verify SQL downloads', () => {
169162
describe('Test table display', () => {
170163
beforeEach(() => {
171164
cy.visit('app/opendistro-query-workbench');
165+
cy.wait(delay);
172166
cy.get('.euiToggle__input[title=SQL]').click();
173167
cy.wait(delay);
174168
cy.get('textarea.ace_text-input').eq(0).focus().type('{selectall}{backspace}', { force: true });

workbench/.cypress/utils/constants.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* permissions and limitations under the License.
1414
*/
1515

16-
export const delay = 300;
16+
export const delay = 1000;
1717

1818
export const verifyDownloadData = [
1919
{

0 commit comments

Comments
 (0)