From 25d64433dff3ffcf083c2cedd8d849de49a691d1 Mon Sep 17 00:00:00 2001 From: Stephen Smith Date: Thu, 23 Jun 2022 17:19:05 -0400 Subject: [PATCH] 19093: Add cypress test for container_count warning Arvados-DCO-1.1-Signed-off-by: Stephen Smith --- cypress/integration/process.spec.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/cypress/integration/process.spec.js b/cypress/integration/process.spec.js index 48b936cf..faf70c49 100644 --- a/cypress/integration/process.spec.js +++ b/cypress/integration/process.spec.js @@ -244,5 +244,27 @@ describe('Process tests', function() { .should('contain', 'Free disk space is low') .and('contain', 'No additional warning details available'); }); + + + // Force container_count for testing + let containerCount = 2; + cy.intercept({method: 'GET', url: '**/arvados/v1/container_requests/*'}, (req) => { + req.reply((res) => { + res.body.container_count = containerCount; + }); + }); + + cy.getAll('@containerRequest').then(function([containerRequest]) { + cy.goToPath(`/processes/${containerRequest.uuid}`); + cy.get('[data-cy=process-runtime-status-retry-warning]') + .should('contain', 'Process retried 1 time'); + }); + + cy.getAll('@containerRequest').then(function([containerRequest]) { + containerCount = 3; + cy.goToPath(`/processes/${containerRequest.uuid}`); + cy.get('[data-cy=process-runtime-status-retry-warning]') + .should('contain', 'Process retried 2 times'); + }); }); }); -- 2.30.2