From 3e1beaf7acec64352d6976e33e3250afc0f0f0d8 Mon Sep 17 00:00:00 2001
From: Jure Triglav <juretriglav@gmail.com>
Date: Fri, 11 Sep 2020 12:45:36 +0200
Subject: [PATCH] test: fix finding of button in spec

---
 cypress/integration/submission_with_errors_spec.js | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/cypress/integration/submission_with_errors_spec.js b/cypress/integration/submission_with_errors_spec.js
index 999a73f2d2..a119a696a2 100644
--- a/cypress/integration/submission_with_errors_spec.js
+++ b/cypress/integration/submission_with_errors_spec.js
@@ -13,9 +13,7 @@ describe('Submission with errors test', () => {
 
     cy.get('body').contains('Submission created')
 
-    cy.get('button')
-      .contains('Submit your research object')
-      .click()
+    cy.contains('button', 'Submit your research object').click()
 
     cy.get('body').contains('Enter at least 4 characters')
 
@@ -23,9 +21,7 @@ describe('Submission with errors test', () => {
       .click()
       .type('Emily Clay')
 
-    cy.get('button')
-      .contains('Submit your research object')
-      .click()
+    cy.contains('button', 'Submit your research object').click()
 
     cy.get('body').contains('Enter at least 2 characters')
 
@@ -39,9 +35,7 @@ describe('Submission with errors test', () => {
       .clear()
       .type('My Fixed URL Submission')
 
-    cy.get('button')
-      .contains('Submit your research object')
-      .click()
+    cy.contains('button', 'Submit your research object').click()
     cy.get('button')
       .contains('Submit your manuscript')
       .click()
-- 
GitLab