Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add back gp section and related tests #194

Merged
merged 2 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ckanext/datagovtheme/templates/package/read.html
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ <h3>{{ _('Metadata Source') }}</h3>
{% endif %}
{% endif %}

<!-- {% include 'package/snippets/geoplatform_link.html' %} -->
{% 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' %}
Expand Down
74 changes: 37 additions & 37 deletions cypress/e2e/geoplatform.cy.js
Original file line number Diff line number Diff line change
@@ -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"
);
});
});
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=[
Expand Down
Loading