From a57050ecf9beee823a19050a3b25bafaf2085121 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tibor=20Cserv=C3=A1k?= Date: Wed, 9 Aug 2023 11:20:51 +0200 Subject: [PATCH] Jump directly to documentation url without error modal Currently on the report detail page there is a red error bubble where we can click on the checker documentation button to have more information about the error. The button click triggers a modal that contains already known information and the real checker documentation URL. The modal is unnecessary and it has two steps to navigate to the effective documentation. To reduce the step numbers, there are some modifications in the Report and the ReportStepMessage components. When the report page is loaded the first thing is to create an errorChecker, then getting its documentation and passing it to ReportStepMessage via props. The ReportStepMessage component present the checker documentation button if the URL exists. The button refers to the checker error documentation without displaying a modal. When the documentation is not available, the ReportStepMessage shows the "No documentation for checker." message in the bubble. --- web/server/vue-cli/e2e/specs/reportDetail.js | 20 +++++------ .../vue-cli/src/components/Report/Report.vue | 35 ++++++++++++------- .../components/Report/ReportStepMessage.vue | 18 +++++++--- 3 files changed, 46 insertions(+), 27 deletions(-) diff --git a/web/server/vue-cli/e2e/specs/reportDetail.js b/web/server/vue-cli/e2e/specs/reportDetail.js index 2c01a6fb98..1c715d6264 100644 --- a/web/server/vue-cli/e2e/specs/reportDetail.js +++ b/web/server/vue-cli/e2e/specs/reportDetail.js @@ -25,18 +25,18 @@ module.exports = { "show documentation" (browser) { const reportDetailPage = browser.page.reportDetail(); - const dialog = reportDetailPage.section.documentationDialog; + reportDetailPage.expect.element('@showDocumentationBtn') + .to.be.present.before(5000, false); - reportDetailPage.click("@showDocumentationBtn"); + reportDetailPage.click('@showDocumentationBtn'); - reportDetailPage.expect.section(dialog) - .to.be.visible.before(5000); - - dialog.expect.element("@content").text.to.not.equal(null); - - dialog.pause(100).click("@closeBtn"); - - reportDetailPage.expect.section(dialog).to.not.be.present.before(5000); + browser.windowHandles(windowObj => { + if (windowObj.value.length > 1) { + browser.switchWindow(windowObj.value[1]); + browser.closeWindow(); + browser.switchWindow(windowObj.value[0]); + } + }); }, "show blame information" (browser) { diff --git a/web/server/vue-cli/src/components/Report/Report.vue b/web/server/vue-cli/src/components/Report/Report.vue index 2a336a6022..154348f975 100644 --- a/web/server/vue-cli/src/components/Report/Report.vue +++ b/web/server/vue-cli/src/components/Report/Report.vue @@ -1,10 +1,5 @@