| 
      
            Lines 7-22
          describe("ERM Module Dashboard", () => {
      
      
        Link Here
      
     | 
  
        
          | 7 | 
                      "/api/v1/erm/config",  | 
          7 | 
                      "/api/v1/erm/config",  | 
        
        
          | 8 | 
                      '{"settings":{"ERMModule":"1","ERMProviders":["local"]}}' | 
          8 | 
                      '{"settings":{"ERMModule":"1","ERMProviders":["local"]}}' | 
        
        
          | 9 | 
                  );  | 
          9 | 
                  );  | 
        
          
            
              | 10 | 
                      cy.intercept("GET", "/api/v1/erm/counts", { | 
              10 | 
               | 
            
            
              | 11 | 
                          counts: { | 
              11 | 
                      cy.intercept("GET", "/api/v1/erm/agreements*", { | 
            
            
              | 12 | 
                              agreements_count: 1,  | 
              12 | 
                          statusCode: 200,  | 
            
            
              | 13 | 
                              documents_count: 0,  | 
              13 | 
                          headers: { | 
            
            
              | 14 | 
                              eholdings_packages_count: 0,  | 
              14 | 
                              "X-Total-Count": "1",  | 
            
            
              | 15 | 
                              eholdings_titles_count: 0,  | 
              15 | 
                          },  | 
            
            
              | 16 | 
                              licenses_count: 5,  | 
              16 | 
                      }).as("getAgreementsCount"); | 
            
            
              | 17 | 
                              usage_data_providers_count: 1,  | 
              17 | 
               | 
            
            
               | 
               | 
              18 | 
                      cy.intercept("GET", "/api/v1/erm/eholdings/local/packages*", { | 
            
            
              | 19 | 
                          statusCode: 200,  | 
            
            
              | 20 | 
                          headers: { | 
            
            
              | 21 | 
                              "X-Total-Count": "0",  | 
            
            
              | 22 | 
                          },  | 
            
            
              | 23 | 
                      }).as("getPackagesCount"); | 
            
            
              | 24 | 
               | 
            
            
              | 25 | 
                      cy.intercept("GET", "/api/v1/erm/eholdings/local/titles*", { | 
            
            
              | 26 | 
                          statusCode: 200,  | 
            
            
              | 27 | 
                          headers: { | 
            
            
              | 28 | 
                              "X-Total-Count": "0",  | 
            
            
              | 29 | 
                          },  | 
            
            
              | 30 | 
                      }).as("getTitlesCount"); | 
            
            
              | 31 | 
               | 
            
            
              | 32 | 
                      cy.intercept("GET", "/api/v1/erm/licenses*", { | 
            
            
              | 33 | 
                          statusCode: 200,  | 
            
            
              | 34 | 
                          headers: { | 
            
            
              | 35 | 
                              "X-Total-Count": "5",  | 
            
        
          | 18 | 
                      },  | 
          36 | 
                      },  | 
        
          
            
              | 19 | 
                      }).as("getCounts"); | 
              37 | 
                      }).as("getLicensesCount"); | 
            
            
               | 
               | 
              38 | 
               | 
            
            
              | 39 | 
                      cy.intercept("GET", "/api/v1/erm/usage_data_providers*", { | 
            
            
              | 40 | 
                          statusCode: 200,  | 
            
            
              | 41 | 
                          headers: { | 
            
            
              | 42 | 
                              "X-Total-Count": "1",  | 
            
            
              | 43 | 
                          },  | 
            
            
              | 44 | 
                      }).as("getDataProvidersCount"); | 
            
        
          | 20 | 
           | 
          45 | 
           | 
        
        
          | 21 | 
                  cy.intercept(  | 
          46 | 
                  cy.intercept(  | 
        
        
          | 22 | 
                      "GET",  | 
          47 | 
                      "GET",  | 
        
  
    | 
      
            Lines 24-32
          describe("ERM Module Dashboard", () => {
      
      
        Link Here
      
     | 
  
        
          | 24 | 
                      cy.get_eusage_reports()  | 
          49 | 
                      cy.get_eusage_reports()  | 
        
        
          | 25 | 
                  ).as("getReports"); | 
          50 | 
                  ).as("getReports"); | 
        
        
          | 26 | 
           | 
          51 | 
           | 
        
          
            
              | 27 | 
                      cy.intercept("GET", "/api/v1/erm/licenses*", [cy.get_license()]).as( | 
              52 | 
                      cy.intercept("GET", "/api/v1/erm/licenses*", { | 
            
            
              | 28 | 
                          "getLicenses"  | 
              53 | 
                          statusCode: 200,  | 
            
            
              | 29 | 
                      );  | 
              54 | 
                          body: [cy.get_license()],  | 
            
            
               | 
               | 
              55 | 
                          headers: { | 
            
            
              | 56 | 
                              "X-Total-Count": "5",  | 
            
            
              | 57 | 
                          },  | 
            
            
              | 58 | 
                      }).as("getLicenses"); | 
            
        
          | 30 | 
           | 
          59 | 
           | 
        
        
          | 31 | 
                  cy.intercept("GET", "/api/v1/jobs*", [ | 
          60 | 
                  cy.intercept("GET", "/api/v1/jobs*", [ | 
        
        
          | 32 | 
                      { | 
          61 | 
                      { | 
        
  
    | 
      
            Lines 98-111
          describe("ERM Module Dashboard", () => {
      
      
        Link Here
      
     | 
  
        
          | 98 | 
                  cy.visit("/cgi-bin/koha/erm/erm.pl"); | 
          127 | 
                  cy.visit("/cgi-bin/koha/erm/erm.pl"); | 
        
        
          | 99 | 
           | 
          128 | 
           | 
        
        
          | 100 | 
                  //Display  | 
          129 | 
                  //Display  | 
        
          
            
              | 101 | 
                      cy.get(".widget#ERMCounts .widget-content").should( | 
              130 | 
                      cy.wait("@getAgreementsCount"); | 
            
            
              | 102 | 
                          "contain",  | 
              131 | 
                      cy.wait("@getLicenses"); | 
            
            
              | 103 | 
                          "Loading..."  | 
              132 | 
                      cy.wait("@getPackagesCount"); | 
            
            
              | 104 | 
                      );  | 
              133 | 
                      cy.wait("@getTitlesCount"); | 
            
            
              | 105 | 
                      cy.wait("@getCounts"); | 
              134 | 
                      cy.wait("@getDataProvidersCount"); | 
            
        
          | 106 | 
                  cy.get(".widget#ERMCounts .widget-content").contains("1 agreement"); | 
          135 | 
                  cy.get(".widget#ERMCounts .widget-content").contains("1 agreement"); | 
        
        
          | 107 | 
                  cy.get(".widget#ERMCounts .widget-content").contains("5 licenses"); | 
          136 | 
                  cy.get(".widget#ERMCounts .widget-content").contains("5 licenses"); | 
        
            
              | 108 | 
                      cy.get(".widget#ERMCounts .widget-content").contains("0 documents"); | 
               | 
               | 
            
        
          | 109 | 
                  cy.get(".widget#ERMCounts .widget-content").contains( | 
          137 | 
                  cy.get(".widget#ERMCounts .widget-content").contains( | 
        
        
          | 110 | 
                      "0 local packages"  | 
          138 | 
                      "0 local packages"  | 
        
        
          | 111 | 
                  );  | 
          139 | 
                  );  | 
        
            
              | 112 | 
              -   | 
               | 
               |