From 1633b4fe2d583b37c582fb27987cc73ef26abb0f Mon Sep 17 00:00:00 2001 From: tijlb99 Date: Sun, 16 Aug 2020 11:05:51 +0200 Subject: [PATCH] potential fix for cypress bug where it randomly fails clicking a react link (https://github.com/cypress-io/cypress/issues/5743) --- cypress/integration/e2e/firstclass_spec.js | 4 ++-- cypress/integration/e2e/folder0/class0_spec.js | 16 ++++++++-------- cypress/integration/e2e/folder1/class4_spec.js | 6 +++--- cypress/integration/e2e/folder1/class6_spec.js | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cypress/integration/e2e/firstclass_spec.js b/cypress/integration/e2e/firstclass_spec.js index 0496d43..1a2f3bb 100644 --- a/cypress/integration/e2e/firstclass_spec.js +++ b/cypress/integration/e2e/firstclass_spec.js @@ -10,14 +10,14 @@ describe('FirstClass test', () => { cy.contains("_name") cy.contains("getName() : String") - cy.get('a').contains("setName").click() + cy.get('a').contains("setName").click({force: true}) cy.url().should('include', '/firstclass/FirstClass/setName') cy.visit("http://localhost:8000/modules/folder1/class4") cy.contains("Class4") cy.contains("Callback") - cy.contains(/^PrimitiveArray/).click() + cy.contains(/^PrimitiveArray/).click({force: true}) cy.url().should('include', '/class4/PrimitiveArray') }) diff --git a/cypress/integration/e2e/folder0/class0_spec.js b/cypress/integration/e2e/folder0/class0_spec.js index e0adcfa..9dd8669 100644 --- a/cypress/integration/e2e/folder0/class0_spec.js +++ b/cypress/integration/e2e/folder0/class0_spec.js @@ -11,32 +11,32 @@ describe('Class0 test', () => { cy.contains("getName() : String") - cy.get('a').contains("This should link to itself").click() + cy.get('a').contains("This should link to itself").click({force: true}) cy.url().should('include', '/class0/Class0/myClass0') cy.wait(500) - cy.get('a').contains("folder0/class0/Class0").click() + cy.get('a').contains("folder0/class0/Class0").click({force: true}) cy.url().should('include', '/class0/Class0') - cy.get('a').contains("Class0.getName").click() + cy.get('a').contains("Class0.getName").click({force: true}) cy.url().should('include', '/class0/Class0/getName') - cy.get('a').contains("folder0/class0/Class0").click() + cy.get('a').contains("folder0/class0/Class0").click({force: true}) cy.url().should('include', '/class0/Class0') - cy.get('a').contains(/^getName$/).click() + cy.get('a').contains(/^getName$/).click({force: true}) cy.url().should('include', '/class0/Class0/getName') - cy.get('a').contains("folder0/class0/Class0").click() + cy.get('a').contains("folder0/class0/Class0").click({force: true}) cy.url().should('include', '/class0/Class0') - cy.get('a').contains("FirstClass.getName").click() + cy.get('a').contains("FirstClass.getName").click({force: true}) cy.url().should('include', '/firstclass/FirstClass/getName') cy.visit('http://localhost:8000/modules/folder0/class0/Class0') - cy.get('.type').get('a').contains(/^FirstClass/).click() + cy.get('.type').get('a').contains(/^FirstClass/).click({force: true}) cy.url().should('include', '/firstclass/FirstClass') }) }) \ No newline at end of file diff --git a/cypress/integration/e2e/folder1/class4_spec.js b/cypress/integration/e2e/folder1/class4_spec.js index 216ae1d..37f701d 100644 --- a/cypress/integration/e2e/folder1/class4_spec.js +++ b/cypress/integration/e2e/folder1/class4_spec.js @@ -7,16 +7,16 @@ describe('Class4 test', () => { cy.get(".signature-summary").contains("(") cy.get(".signature-summary").contains("string") - cy.get(".signature-summary").contains(/^Class0$/).click() + cy.get(".signature-summary").contains(/^Class0$/).click({force: true}) cy.url().should('include', '/class0/Class0') cy.visit('http://localhost:8000/modules/folder1/class4/Class4/function') - cy.get(".signature-summary").contains(/^Class1$/).click() + cy.get(".signature-summary").contains(/^Class1$/).click({force: true}) cy.url().should('include', '/class1/Class1') cy.visit('http://localhost:8000/modules/folder1/class4/Class4/function') cy.get(".returns").get("code").contains("null") - cy.get(".returns").get("a").contains(/^Class1$/).click() + cy.get(".returns").get("a").contains(/^Class1$/).click({force: true}) cy.url().should('include', '/class1/Class1') cy.visit('http://localhost:8000/modules/folder1/class4/Callback') diff --git a/cypress/integration/e2e/folder1/class6_spec.js b/cypress/integration/e2e/folder1/class6_spec.js index 6126fcd..fb68eeb 100644 --- a/cypress/integration/e2e/folder1/class6_spec.js +++ b/cypress/integration/e2e/folder1/class6_spec.js @@ -5,7 +5,7 @@ describe('Class6 test', () => { cy.get(".kind-string").contains("Class") cy.get(".signature-summary").contains("new Class6") - cy.get(".signature-summary").get('a').contains('FirstClass').click() + cy.get(".signature-summary").get('a').contains('FirstClass').click({force: true}) cy.url().should('include', '/firstclass/FirstClass') cy.visit('http://localhost:8000/modules/folder1/class6/Class6/property')