-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
45 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
// ); | ||
// }); | ||
// }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
}); | ||
}); |