Skip to content

Commit

Permalink
remove gp tests and fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
rshewitt committed Mar 13, 2024
1 parent bf93b73 commit 7efda7d
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 43 deletions.
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"
// );
// });
// });
14 changes: 8 additions & 6 deletions cypress/e2e/unique_identifier.cy.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
describe('Dataset page identifier', () => {
describe("Dataset page identifier", () => {
// Uses datasets from seed.py which created test ones to check

it('check unique identifier is not unknow', () => {
cy.visit('/dataset');
cy.get('ul.dataset-list > li:first a').click({force: true});
cy.get('th[property="rdfs:label"]').contains('Identifier')
.get('td[property="rdf:value"]').should('not.have.text', 'Unknown');
it("check unique identifier is not unknown", () => {
cy.visit("/dataset");
cy.get("ul.dataset-list > li:first a").click({ force: true });
cy.get('th[property="rdfs:label"]')
.contains("Identifier")
.get('td[property="rdf:value"]')
.should("not.have.text", "Unknown");
});
});

0 comments on commit 7efda7d

Please sign in to comment.