20219: Start / stop log polling when container is running
[arvados-workbench2.git] / cypress / integration / process.spec.js
index 00a6631bcdcbd434fb9fd3c4eab175803fb0a660..b41a443e95a326eb2258edef3df102dc8654c7b4 100644 (file)
@@ -2,6 +2,8 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
+import { ContainerState } from 'models/container';
+
 describe('Process tests', function() {
     let activeUser;
     let adminUser;
@@ -415,6 +417,12 @@ describe('Process tests', function() {
 
     describe('Logs panel', function() {
         it('shows live process logs', function() {
+            cy.intercept({method: 'GET', url: '**/arvados/v1/containers/*'}, (req) => {
+                req.reply((res) => {
+                    res.body.state = ContainerState.RUNNING;
+                });
+            });
+
             const crName = 'test_container_request';
             createContainerRequest(
                 activeUser,