21461: Fixes excessive indentation to improve readability.
authorLucas Di Pentima <lucas.dipentima@curii.com>
Thu, 22 Feb 2024 21:53:07 +0000 (18:53 -0300)
committerLucas Di Pentima <lucas.dipentima@curii.com>
Thu, 22 Feb 2024 21:53:07 +0000 (18:53 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima@curii.com>

services/workbench2/cypress/e2e/banner-tooltip.cy.js

index 295bc380c3d20ed716da34f9240f41fb11bf192b..41ca0dec4051dfbba1b857319ce9c2a1ddb9835a 100644 (file)
@@ -73,43 +73,41 @@ describe('Banner / tooltip tests', function () {
     });
 
     const setupTheEnvironment = () => {
-            cy.createCollection(adminUser.token, {
-                name: `BannerTooltipTest${Math.floor(Math.random() * 999999)}`,
-                owner_uuid: adminUser.user.uuid,
-            }).as('bannerCollection');
+        cy.createCollection(adminUser.token, {
+            name: `BannerTooltipTest${Math.floor(Math.random() * 999999)}`,
+            owner_uuid: adminUser.user.uuid,
+        }).as('bannerCollection');
 
-            cy.getAll('@bannerCollection')
-                .then(function ([bannerCollection]) {
+        cy.getAll('@bannerCollection').then(function ([bannerCollection]) {
+            collectionUUID=bannerCollection.uuid;
 
-                    collectionUUID=bannerCollection.uuid;
+            cy.loginAs(adminUser);
 
-                    cy.loginAs(adminUser);
+            cy.goToPath(`/collections/${bannerCollection.uuid}`);
 
-                    cy.goToPath(`/collections/${bannerCollection.uuid}`);
+            cy.get('[data-cy=upload-button]').click();
 
-                    cy.get('[data-cy=upload-button]').click();
+            cy.fixture('files/banner.html').as('banner');
+            cy.fixture('files/tooltips.txt').as('tooltips');
 
-                    cy.fixture('files/banner.html').as('banner');
-                    cy.fixture('files/tooltips.txt').as('tooltips');
-
-                    cy.getAll('@banner', '@tooltips')
-                        .then(([banner, tooltips]) => {
-                            cy.get('[data-cy=drag-and-drop]').upload(banner, 'banner.html', false);
-                            cy.get('[data-cy=drag-and-drop]').upload(tooltips, 'tooltips.json', false);
-                        });
+            cy.getAll('@banner', '@tooltips')
+                .then(([banner, tooltips]) => {
+                    cy.get('[data-cy=drag-and-drop]').upload(banner, 'banner.html', false);
+                    cy.get('[data-cy=drag-and-drop]').upload(tooltips, 'tooltips.json', false);
+                });
 
-                    cy.get('[data-cy=form-submit-btn]').click();
-                    cy.get('[data-cy=form-submit-btn]').should('not.exist');
-                    cy.get('[data-cy=collection-files-right-panel]')
-                        .contains('banner.html').should('exist');
-                    cy.get('[data-cy=collection-files-right-panel]')
-                        .contains('tooltips.json').should('exist');
+            cy.get('[data-cy=form-submit-btn]').click();
+            cy.get('[data-cy=form-submit-btn]').should('not.exist');
+            cy.get('[data-cy=collection-files-right-panel]')
+                .contains('banner.html').should('exist');
+            cy.get('[data-cy=collection-files-right-panel]')
+                .contains('tooltips.json').should('exist');
 
-                        cy.intercept({ method: 'GET', url: '**/arvados/v1/config?nocache=*' }, (req) => {
-                            req.reply((res) => {
-                                res.body.Workbench.BannerUUID = collectionUUID;
-                            });
-                        });
+            cy.intercept({ method: 'GET', url: '**/arvados/v1/config?nocache=*' }, (req) => {
+                req.reply((res) => {
+                    res.body.Workbench.BannerUUID = collectionUUID;
                 });
+            });
+        });
     }
 });