diff --git a/ckanext/datagovtheme/templates/package/read.html b/ckanext/datagovtheme/templates/package/read.html index 66ff10b4..98706dbb 100644 --- a/ckanext/datagovtheme/templates/package/read.html +++ b/ckanext/datagovtheme/templates/package/read.html @@ -268,7 +268,7 @@

{{ _('Metadata Source') }}

{% endif %} {% endif %} - + {% include 'package/snippets/geoplatform_link.html' %} {% set graphic_preview_file =h.get_pkg_dict_extra(pkg, 'graphic-preview-file', None) %} {% if graphic_preview_file and graphic_preview_file.lower()[:4] == 'http' %} diff --git a/cypress/e2e/geoplatform.cy.js b/cypress/e2e/geoplatform.cy.js index 065cd402..0f09fc46 100644 --- a/cypress/e2e/geoplatform.cy.js +++ b/cypress/e2e/geoplatform.cy.js @@ -1,40 +1,40 @@ -// describe("Geoplatform Link", () => { -// it("Check if other data resources section is visible", () => { -// cy.intercept( -// { -// method: "GET", -// url: "https://api.geoplatform.gov/v3/public/lookups/data-gov/dataset?name=test_mock_geoplatform_data", -// }, -// { -// statusCode: 200, -// body: { -// geoplatform_url: "https://www.youtube.com/", -// }, -// } -// ); +describe("Geoplatform Link", () => { + it("Check if other data resources section is visible", () => { + cy.intercept( + { + method: "GET", + url: "https://api.geoplatform.gov/v3/public/lookups/data-gov/dataset?name=test_mock_geoplatform_data", + }, + { + statusCode: 200, + body: { + geoplatform_url: "https://www.youtube.com/", + }, + } + ); -// cy.visit("/dataset/test_mock_geoplatform_data"); -// cy.wait(10000); -// cy.get('section[id="geoplatform-link-section"]') -// .scrollIntoView() -// .should("be.visible"); -// }); + cy.visit("/dataset/test_mock_geoplatform_data"); + cy.wait(10000); + cy.get('section[id="geoplatform-link-section"]') + .scrollIntoView() + .should("be.visible"); + }); -// it("Check if other data resources section is not visible", () => { -// cy.intercept( -// { -// method: "GET", -// url: "https://api.geoplatform.gov/v3/public/lookups/data-gov/dataset?name=test_bad_mock_geoplatform_data", -// }, -// { -// statusCode: 404, -// body: {}, -// } -// ); + it("Check if other data resources section is not visible", () => { + cy.intercept( + { + method: "GET", + url: "https://api.geoplatform.gov/v3/public/lookups/data-gov/dataset?name=test_bad_mock_geoplatform_data", + }, + { + statusCode: 404, + body: {}, + } + ); -// cy.visit("/dataset/test_bad_mock_geoplatform_data"); -// cy.get('section[id="geoplatform-link-section"]').should( -// "not.be.visible" -// ); -// }); -// }); + cy.visit("/dataset/test_bad_mock_geoplatform_data"); + cy.get('section[id="geoplatform-link-section"]').should( + "not.be.visible" + ); + }); +}); diff --git a/setup.py b/setup.py index 5ea51c10..2069df3a 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( name="ckanext-datagovtheme", - version="0.2.19", + version="0.2.20", description="CKAN Extension to manage data.gov theme", long_description=long_description, classifiers=[