Attempt to fix flaky integration tests (#3755)

* Attempt fo fix flaky test : add_columns_based_on_this_column, Clojure, replaced .contains by assertion

* Attempt fo fix flaky test apply.spec.js

* Attempt to fix many flaky tests in a row, by addinf assertions to ensure OpenRefine is properly loaded
This commit is contained in:
Florian Giroud 2021-03-18 16:03:32 +01:00 committed by GitHub
parent c29ba491a3
commit a9e03eabd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View File

@ -12,7 +12,7 @@ describe(__filename, function () {
cy.typeExpression('value.toLowercase()');
cy.get(
'.expression-preview-table-wrapper tr:nth-child(2) td:last-child'
).contains('butter,with salt');
).should('to.contain', 'butter,with salt');
cy.confirmDialogPanel();
cy.assertCellEquals(0, 'Test_GREL_toLower', 'butter,with salt');
@ -32,7 +32,7 @@ describe(__filename, function () {
cy.typeExpression('return value.lower()');
cy.get(
'.expression-preview-table-wrapper tr:nth-child(2) td:last-child'
).contains('butter,with salt');
).should('to.contain', 'butter,with salt');
cy.confirmDialogPanel();
cy.assertCellEquals(0, 'Test_Python_toLower', 'butter,with salt');
@ -52,7 +52,7 @@ describe(__filename, function () {
cy.typeExpression('(.. value (toLowerCase) )');
cy.get(
'.expression-preview-table-wrapper tr:nth-child(2) td:last-child'
).contains('butter,with salt');
).should('to.contain', 'butter,with salt');
cy.confirmDialogPanel();
cy.assertCellEquals(0, 'Test_Clojure_toLower', 'butter,with salt');

View File

@ -2,7 +2,7 @@ describe(__filename, function () {
it('Apply a JSON', function () {
cy.loadAndVisitProject('food.mini');
cy.get('#or-proj-undoRedo').click();
cy.get('#or-proj-undoRedo').should('to.exist').should('be.visible').click();
cy.get('#refine-tabs-history .history-panel-controls')
.contains('Apply')
.click();

View File

@ -286,6 +286,9 @@ Cypress.Commands.add(
(fixture, projectName = Date.now()) => {
cy.loadProject(fixture, projectName).then((projectId) => {
cy.visit(Cypress.env('OPENREFINE_URL') + '/project?project=' + projectId);
cy.get('#left-panel', { log: false }).should('be.visible');
cy.get('#right-panel', { log: false }).should('be.visible');
});
}
);