Skip to content

Commit

Permalink
fix: create project tests fails due to less timeout (#3757)
Browse files Browse the repository at this point in the history
Signed-off-by: kushthedude <kushthedude@gmail.com>
  • Loading branch information
kushthedude committed Mar 18, 2021
1 parent deae864 commit c29ba49
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 19 deletions.
Expand Up @@ -19,10 +19,12 @@ describe(__filename, function () {
).attachFile(csvFile);
cy.get(
'.create-project-ui-source-selection-tab-body.selected button.button-primary'
).click();
cy.get(
'.default-importing-wizard-header input[bind="projectNameInput"]'
).should('have.value', 'food mini csv');
)
.contains('Next »')
.click();
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
cy.get('.create-project-ui-panel').contains('Configure Parsing Options');
Expand Down Expand Up @@ -50,10 +52,12 @@ describe(__filename, function () {
).attachFile(tsvFile);
cy.get(
'.create-project-ui-source-selection-tab-body.selected button.button-primary'
).click();
cy.get(
'.default-importing-wizard-header input[bind="projectNameInput"]'
).should('have.value', 'shop mini tsv');
)
.contains('Next »')
.click();
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
cy.get('.create-project-ui-panel').contains('Configure Parsing Options');
Expand Down Expand Up @@ -85,9 +89,9 @@ describe(__filename, function () {
)
.contains('Next »')
.click();
cy.get(
'.default-importing-wizard-header input[bind="projectNameInput"]'
).should('have.value', 'Clipboard');
cy.get('.default-importing-wizard-header input[bind="projectNameInput"]', {
timeout: 6000,
}).should('have.value', 'Clipboard');

// then ensure we are on the preview page
cy.get('.create-project-ui-panel').contains('Configure Parsing Options');
Expand Down Expand Up @@ -115,9 +119,9 @@ describe(__filename, function () {
)
.contains('Next »')
.click();
cy.get(
'.default-importing-wizard-header input[bind="projectNameInput"]'
).should('have.value', 'Clipboard');
cy.get('.default-importing-wizard-header input[bind="projectNameInput"]', {
timeout: 6000,
}).should('have.value', 'Clipboard');

// then ensure we are on the preview page
cy.get('.create-project-ui-panel').contains('Configure Parsing Options');
Expand Down Expand Up @@ -145,9 +149,9 @@ describe(__filename, function () {
)
.contains('Next »')
.click();
cy.get(
'.default-importing-wizard-header input[bind="projectNameInput"]'
).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
cy.get('.create-project-ui-panel').contains('Configure Parsing Options');
Expand Down Expand Up @@ -177,7 +181,7 @@ describe(__filename, function () {
)
.contains('Next »')
.click();
cy.get('.create-project-ui-panel', { timeout: 7500 })
cy.get('.create-project-ui-panel', { timeout: 10000 })
.contains('Configure Parsing Options »')
.click();
cy.get(
Expand Down
2 changes: 1 addition & 1 deletion main/tests/cypress/cypress/support/commands.js
Expand Up @@ -73,7 +73,7 @@ Cypress.Commands.add('doCreateProjectThroughUserInterface', () => {

// workaround to ensure project is loaded
// 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) => {
expect(location.href).contains(
Cypress.env('OPENREFINE_URL') + '/__/project?'
Expand Down

0 comments on commit c29ba49

Please sign in to comment.