19315: Increase timeouts for log cypress tests
[arvados.git] / cypress / integration / process.spec.js
index 84c786bdef42e74f7eb2f85060bf789d0bf7aa67..7ba3b329002c531600182d6c4cd189535d952dd8 100644 (file)
@@ -107,12 +107,49 @@ describe('Process tests', function() {
                 event_type: 'stdout'
             }).then(function(log) {
                 cy.get('[data-cy=process-logs]')
-                    .should('not.contain', 'No logs yet')
+                    .should('not.contain', 'No logs yet', {timeout: 7000})
                     .and('contain', 'hello world');
             })
         });
     });
 
+    it('shows process details', function() {
+        createContainerRequest(
+            activeUser,
+            `test_container_request ${Math.floor(Math.random() * 999999)}`,
+            'arvados/jobs',
+            ['echo', 'hello world'],
+            false, 'Committed')
+        .then(function(containerRequest) {
+            cy.loginAs(activeUser);
+            cy.goToPath(`/processes/${containerRequest.uuid}`);
+            cy.get('[data-cy=process-details]').should('contain', containerRequest.name);
+            cy.get('[data-cy=process-details-attributes-modifiedby-user]').contains(`Active User (${activeUser.user.uuid})`);
+            cy.get('[data-cy=process-details-attributes-runtime-user]').should('not.exist');
+        });
+
+        // Fake submitted by another user
+        cy.intercept({method: 'GET', url: '**/arvados/v1/container_requests/*'}, (req) => {
+            req.reply((res) => {
+                res.body.modified_by_user_uuid = 'zzzzz-tpzed-000000000000000';
+            });
+        });
+
+        createContainerRequest(
+            activeUser,
+            `test_container_request ${Math.floor(Math.random() * 999999)}`,
+            'arvados/jobs',
+            ['echo', 'hello world'],
+            false, 'Committed')
+        .then(function(containerRequest) {
+            cy.loginAs(activeUser);
+            cy.goToPath(`/processes/${containerRequest.uuid}`);
+            cy.get('[data-cy=process-details]').should('contain', containerRequest.name);
+            cy.get('[data-cy=process-details-attributes-modifiedby-user]').contains(`zzzzz-tpzed-000000000000000`);
+            cy.get('[data-cy=process-details-attributes-runtime-user]').contains(`Active User (${activeUser.user.uuid})`);
+        });
+    });
+
     it('filters process logs by event type', function() {
         const nodeInfoLogs = [
             'Host Information',
@@ -263,14 +300,14 @@ describe('Process tests', function() {
 
         cy.getAll('@containerRequest').then(function([containerRequest]) {
             cy.goToPath(`/processes/${containerRequest.uuid}`);
-            cy.get('[data-cy=process-runtime-status-retry-warning]')
+            cy.get('[data-cy=process-runtime-status-retry-warning]', {timeout: 7000})
                 .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]')
+            cy.get('[data-cy=process-runtime-status-retry-warning]', {timeout: 7000})
                 .should('contain', 'Process retried 2 times');
         });
     });