Skip to content

Commit

Permalink
Merge pull request #869 from IATI/fix-validation-report-xml-url
Browse files Browse the repository at this point in the history
Improved fix for XML URL links on report page
  • Loading branch information
chrisarridge authored Jan 22, 2025
2 parents c567dc6 + e4ae183 commit 3b20014
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 10 additions & 0 deletions cypress/integration/validationReport.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,14 @@ describe("The Validation Report page", () => {
expect(loc.search).to.eq("?id=XM-TEST-VALIDATION-01-B");
});
});

it("opens the validation report page and presents the correct XML URLs in the document link", () => {
cy.fixture("validationReport01ares");
cy.intercept("**/existing?name=ares-activities", {
fixture: "validationReport01ares.json",
}).as("validation");
cy.visit("/report/ares-activities?id=BE-BCE_KBO-0546740696-PG2017-2021_CD");
cy.get("[data-cy='document-url-anchor']").should("have.attr", "href", "https://aidstream.s3.us-west-2.amazonaws.com/xml/ares-activities.xml");
cy.get("[data-cy='document-url-anchor']").should("have.text", "ares-activities.xml");
});
});
4 changes: 1 addition & 3 deletions src/pages/ReportPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,7 @@
<RouterLink :to="`/organisation/${organisation.name}`">{{ organisation.title }}</RouterLink>
-
</template>
<RouterLink v-if="document" :href="document.url" :external="true">
{{ getDocumentFileName(document) }}
</RouterLink>
<a data-cy="document-url-anchor" v-if="document" :href="document.url">{{ getDocumentFileName(document) }}</a>
<div v-if="dataset && isTestFile">{{ dataset.filename }}</div>
</h2>
<DocumentInfo v-if="dataset && dataset.report" :document="document" :report="dataset.report" />
Expand Down

0 comments on commit 3b20014

Please sign in to comment.