fix: create project tests fails due to less timeout (#3757)

Signed-off-by: kushthedude <kushthedude@gmail.com>
This commit is contained in:
Kush Trivedi 2021-03-18 19:45:58 +05:30 committed by GitHub
parent deae864bca
commit c29ba491a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 19 deletions

View File

@ -19,10 +19,12 @@ describe(__filename, function () {
).attachFile(csvFile); ).attachFile(csvFile);
cy.get( cy.get(
'.create-project-ui-source-selection-tab-body.selected button.button-primary' '.create-project-ui-source-selection-tab-body.selected button.button-primary'
).click(); )
cy.get( .contains('Next »')
'.default-importing-wizard-header input[bind="projectNameInput"]' .click();
).should('have.value', 'food mini csv'); cy.get('.default-importing-wizard-header input[bind="projectNameInput"]', {
timeout: 6000,
}).should('have.value', 'food mini csv');
// then ensure we are on the preview page // then ensure we are on the preview page
cy.get('.create-project-ui-panel').contains('Configure Parsing Options'); cy.get('.create-project-ui-panel').contains('Configure Parsing Options');
@ -50,10 +52,12 @@ describe(__filename, function () {
).attachFile(tsvFile); ).attachFile(tsvFile);
cy.get( cy.get(
'.create-project-ui-source-selection-tab-body.selected button.button-primary' '.create-project-ui-source-selection-tab-body.selected button.button-primary'
).click(); )
cy.get( .contains('Next »')
'.default-importing-wizard-header input[bind="projectNameInput"]' .click();
).should('have.value', 'shop mini tsv'); cy.get('.default-importing-wizard-header input[bind="projectNameInput"]', {
timeout: 6000,
}).should('have.value', 'shop mini tsv');
// then ensure we are on the preview page // then ensure we are on the preview page
cy.get('.create-project-ui-panel').contains('Configure Parsing Options'); cy.get('.create-project-ui-panel').contains('Configure Parsing Options');
@ -85,9 +89,9 @@ describe(__filename, function () {
) )
.contains('Next »') .contains('Next »')
.click(); .click();
cy.get( cy.get('.default-importing-wizard-header input[bind="projectNameInput"]', {
'.default-importing-wizard-header input[bind="projectNameInput"]' timeout: 6000,
).should('have.value', 'Clipboard'); }).should('have.value', 'Clipboard');
// then ensure we are on the preview page // then ensure we are on the preview page
cy.get('.create-project-ui-panel').contains('Configure Parsing Options'); cy.get('.create-project-ui-panel').contains('Configure Parsing Options');
@ -115,9 +119,9 @@ describe(__filename, function () {
) )
.contains('Next »') .contains('Next »')
.click(); .click();
cy.get( cy.get('.default-importing-wizard-header input[bind="projectNameInput"]', {
'.default-importing-wizard-header input[bind="projectNameInput"]' timeout: 6000,
).should('have.value', 'Clipboard'); }).should('have.value', 'Clipboard');
// then ensure we are on the preview page // then ensure we are on the preview page
cy.get('.create-project-ui-panel').contains('Configure Parsing Options'); cy.get('.create-project-ui-panel').contains('Configure Parsing Options');
@ -145,9 +149,9 @@ describe(__filename, function () {
) )
.contains('Next »') .contains('Next »')
.click(); .click();
cy.get( cy.get('.default-importing-wizard-header input[bind="projectNameInput"]', {
'.default-importing-wizard-header input[bind="projectNameInput"]' timeout: 6000,
).should('have.value', 'food mini csv'); }).should('have.value', 'food mini csv');
// then ensure we are on the preview page // then ensure we are on the preview page
cy.get('.create-project-ui-panel').contains('Configure Parsing Options'); cy.get('.create-project-ui-panel').contains('Configure Parsing Options');
@ -177,7 +181,7 @@ describe(__filename, function () {
) )
.contains('Next »') .contains('Next »')
.click(); .click();
cy.get('.create-project-ui-panel', { timeout: 7500 }) cy.get('.create-project-ui-panel', { timeout: 10000 })
.contains('Configure Parsing Options »') .contains('Configure Parsing Options »')
.click(); .click();
cy.get( cy.get(

View File

@ -73,7 +73,7 @@ Cypress.Commands.add('doCreateProjectThroughUserInterface', () => {
// workaround to ensure project is loaded // workaround to ensure project is loaded
// cypress does not support window.location = ... // cypress does not support window.location = ...
cy.get('h2').contains('HTTP ERROR 404'); cy.get('h2', { timeout: 6000 }).contains('HTTP ERROR 404');
cy.location().should((location) => { cy.location().should((location) => {
expect(location.href).contains( expect(location.href).contains(
Cypress.env('OPENREFINE_URL') + '/__/project?' Cypress.env('OPENREFINE_URL') + '/__/project?'