From 4315a7eca4a33cabe05938d2a79df07a43bf7e30 Mon Sep 17 00:00:00 2001 From: Krishna Parmar <201901155@daiict.ac.in> Date: Tue, 26 Mar 2024 16:22:23 +0530 Subject: [PATCH 1/7] #289 Bug Fixed @garg3133 Review Requested. I have been investigating to find any hard-coded redirect but there are none and entire docs have been updated with `/guide`. Afterwards, I found that there is if-else logic running for "See Also" section at, `nightwatch-docs/src/includes/api-method.ejs` In that, the line, `
  • <%= link %>
  • ` generates link accordingly. Now, after many workarounds, I cannot seem to budge the extra two dots that, `appSettings.baseUrl.replace(/\$/,'')` is appending after ".org" domain. I tried: [-] Slicing after replace with (0,-2), but instead of removing double dots, it gives out: https://nightwatchjs.o../ [-] Writing new logic: Gives out same result I found that, replace() method is creating the problems. Simply removing it, works. Additionally, I added "/" in the BASE_URL in postdoc config. Do tell me if this is not right, or should I seek another way to solve the problem? --- postdoc.config.js | 3 +-- src/includes/api-method.ejs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/postdoc.config.js b/postdoc.config.js index 1cb9bbda..bcd4f383 100644 --- a/postdoc.config.js +++ b/postdoc.config.js @@ -3,7 +3,7 @@ import {sep, join, basename, resolve, extname} from 'node:path'; const { NIGHTWATCH_VERSION = '3.5.0', - BASE_URL = 'https://nightwatchjs.org', + BASE_URL = 'https://nightwatchjs.org/', MD_DOCS_FOLDER = './docs', API_DOCS_FOLDER = resolve('../nightwatch/lib/api'), EXAMPLES_FOLDER = 'node_modules/nightwatch-examples/tests' @@ -16,7 +16,6 @@ export default { ] }, - session: { enable_prefetch: false, disable_spa: false diff --git a/src/includes/api-method.ejs b/src/includes/api-method.ejs index 71d3bcca..51a276b3 100644 --- a/src/includes/api-method.ejs +++ b/src/includes/api-method.ejs @@ -134,7 +134,7 @@ npx nightwatch <%- method.exampleLink %> <% if (link.startsWith('http')) { %>
  • <%= link %>
  • <% } else { %> -
  • <%= link %>
  • +
  • <%= link %>
  • <% } %> <% } %> From 09ec83a2d47f5ed6f17df4480102745c81985995 Mon Sep 17 00:00:00 2001 From: Krishna Parmar <201901155@daiict.ac.in> Date: Wed, 27 Mar 2024 09:35:49 +0530 Subject: [PATCH 2/7] BugFix: remove baseUrl @garg3133 Review Requested. As per your suggestion, removing entire appSettings.baseUrl works. Pages seem to be redirected with directly `api` --- src/includes/api-method.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/includes/api-method.ejs b/src/includes/api-method.ejs index 51a276b3..da647c17 100644 --- a/src/includes/api-method.ejs +++ b/src/includes/api-method.ejs @@ -134,7 +134,7 @@ npx nightwatch <%- method.exampleLink %> <% if (link.startsWith('http')) { %>
  • <%= link %>
  • <% } else { %> -
  • <%= link %>
  • +
  • <%= link %>
  • <% } %> <% } %> From 36ceef016e2a2023e2df740f3167eb937454ee2e Mon Sep 17 00:00:00 2001 From: kp250322 Date: Wed, 27 Mar 2024 22:32:35 +0530 Subject: [PATCH 3/7] Revert Changes at postdoc config --- postdoc.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postdoc.config.js b/postdoc.config.js index bcd4f383..4c63f320 100644 --- a/postdoc.config.js +++ b/postdoc.config.js @@ -3,7 +3,7 @@ import {sep, join, basename, resolve, extname} from 'node:path'; const { NIGHTWATCH_VERSION = '3.5.0', - BASE_URL = 'https://nightwatchjs.org/', + BASE_URL = 'https://nightwatchjs.org', MD_DOCS_FOLDER = './docs', API_DOCS_FOLDER = resolve('../nightwatch/lib/api'), EXAMPLES_FOLDER = 'node_modules/nightwatch-examples/tests' From a23877d464f6aca605414d04e66aafb9b6c35bf8 Mon Sep 17 00:00:00 2001 From: kp250322 Date: Wed, 27 Mar 2024 22:35:29 +0530 Subject: [PATCH 4/7] Revert "Revert Changes at postdoc config" This reverts commit 36ceef016e2a2023e2df740f3167eb937454ee2e. --- postdoc.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postdoc.config.js b/postdoc.config.js index 4c63f320..bcd4f383 100644 --- a/postdoc.config.js +++ b/postdoc.config.js @@ -3,7 +3,7 @@ import {sep, join, basename, resolve, extname} from 'node:path'; const { NIGHTWATCH_VERSION = '3.5.0', - BASE_URL = 'https://nightwatchjs.org', + BASE_URL = 'https://nightwatchjs.org/', MD_DOCS_FOLDER = './docs', API_DOCS_FOLDER = resolve('../nightwatch/lib/api'), EXAMPLES_FOLDER = 'node_modules/nightwatch-examples/tests' From b9f4903e6f3b6a83664b108095ff41a04732c1c9 Mon Sep 17 00:00:00 2001 From: Krishna Parmar <201901155@daiict.ac.in> Date: Wed, 27 Mar 2024 22:38:57 +0530 Subject: [PATCH 5/7] Revert changes at postdoc config --- postdoc.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postdoc.config.js b/postdoc.config.js index bcd4f383..4c63f320 100644 --- a/postdoc.config.js +++ b/postdoc.config.js @@ -3,7 +3,7 @@ import {sep, join, basename, resolve, extname} from 'node:path'; const { NIGHTWATCH_VERSION = '3.5.0', - BASE_URL = 'https://nightwatchjs.org/', + BASE_URL = 'https://nightwatchjs.org', MD_DOCS_FOLDER = './docs', API_DOCS_FOLDER = resolve('../nightwatch/lib/api'), EXAMPLES_FOLDER = 'node_modules/nightwatch-examples/tests' From 994929e7dfde6ef67829cd355f9a74fb5a92fea2 Mon Sep 17 00:00:00 2001 From: Krishna Parmar <201901155@daiict.ac.in> Date: Thu, 28 Mar 2024 10:29:14 +0530 Subject: [PATCH 6/7] Revert changes at postdoc config Adding the empty line at, line 19. --- postdoc.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/postdoc.config.js b/postdoc.config.js index 4c63f320..2fe03781 100644 --- a/postdoc.config.js +++ b/postdoc.config.js @@ -16,6 +16,7 @@ export default { ] }, + session: { enable_prefetch: false, disable_spa: false From 17e93bf54e8d182c068456bf61902541b2b538fa Mon Sep 17 00:00:00 2001 From: Priyansh Garg Date: Thu, 28 Mar 2024 16:25:58 +0530 Subject: [PATCH 7/7] Revert postdoc.config.js changes. --- postdoc.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postdoc.config.js b/postdoc.config.js index 2fe03781..1cb9bbda 100644 --- a/postdoc.config.js +++ b/postdoc.config.js @@ -16,7 +16,7 @@ export default { ] }, - + session: { enable_prefetch: false, disable_spa: false