[arvados-workbench2] created: 2.5.0-40-gdb4a4482

git repository hosting git at public.arvados.org
Mon Feb 20 19:17:12 UTC 2023


        at  db4a44827d8e58913bae985e77a251f72efe5a5e (commit)


commit db4a44827d8e58913bae985e77a251f72efe5a5e
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Mon Feb 20 14:45:44 2023 -0300

    19836: Test tweaking.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/cypress/integration/banner-tooltip.spec.js b/cypress/integration/banner-tooltip.spec.js
index 16235ccd..ccd4166a 100644
--- a/cypress/integration/banner-tooltip.spec.js
+++ b/cypress/integration/banner-tooltip.spec.js
@@ -34,24 +34,29 @@ describe('Collection panel tests', function () {
                     .then(function ([bannerCollection]) {
 
                         collectionUUID=bannerCollection.uuid;
-        
+
                         cy.loginAs(adminUser);
-        
+
                         cy.goToPath(`/collections/${bannerCollection.uuid}`);
-        
+
                         cy.get('[data-cy=upload-button]').click();
-        
+
                         cy.fixture('files/banner.html').as('banner');
                         cy.fixture('files/tooltips.txt').as('tooltips');
-                        
+
                         cy.getAll('@banner', '@tooltips')
                             .then(([banner, tooltips]) => {
                                 console.log(tooltips)
-                                cy.get('[data-cy=drag-and-drop]').upload(btoa(banner), 'banner.html');
-                                cy.get('[data-cy=drag-and-drop]').upload(btoa(tooltips), 'tooltips.json');
+                                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.on('uncaught:exception', (err, runnable) => {console.error(err)});
diff --git a/cypress/support/commands.js b/cypress/support/commands.js
index e98000fc..f09d959b 100644
--- a/cypress/support/commands.js
+++ b/cypress/support/commands.js
@@ -387,9 +387,11 @@ Cypress.Commands.add(
     {
         prevSubject: 'element',
     },
-    (subject, file, fileName) => {
+    (subject, file, fileName, binaryMode = true) => {
         cy.window().then(window => {
-            const blob = b64toBlob(file, '', 512);
+            const blob = binaryMode
+                ? b64toBlob(file, '', 512)
+                : new Blob([file], {type: 'text/plain'});
             const testFile = new window.File([blob], fileName);
 
             cy.wrap(subject).trigger('drop', {

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list