Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use approve button #1543

Open
kartheekgj opened this issue Feb 15, 2024 · 1 comment
Open

Unable to use approve button #1543

kartheekgj opened this issue Feb 15, 2024 · 1 comment

Comments

@kartheekgj
Copy link

kartheekgj commented Feb 15, 2024

Hi,

i followed the steps provided in the documentation to add the approve button in the interactive web reporting but unfortunately i could not see the button comming up. I see backstop remote running sucessfully but when i open http|https://127.0.0.1:3000 donot show the report.
I tried running the backstop using backstop test and when i run the backstop openreport it says its not open to public. When i open the backstop remote it says its rendered but not opening anything. Also where can i change this port number 3000 to anything else. I couldnot find this in the documentation anywhere. Can you provide an example where the approve/reject button is implemented
I can see this has been added somewhere here
https://github.com/garris/BackstopJS/blob/master/remote/index.js
But how to enable this or should we add this as a button and then do the call from the report?

@freesh
Copy link

freesh commented Aug 17, 2024

To see the Button you can add "?remote" to the reports uri. The WebApp is just searching the uri path for 'remote' to show the button.

I you're trying to use the remote command directly from code with something like this:

await backstop('remote', {
      config: {
        ...config,
        "paths": {
          "bitmaps_reference": `backstop_data_${projectName}/bitmaps_reference`,
          "bitmaps_test": `backstop_data_${projectName}/bitmaps_test`,
          "engine_scripts": `backstop_scripts/${projectName}`,
          "html_report": `backstop_data_${projectName}/html_report`,
          "ci_report": `backstop_data_${projectName}/ci_report`
        },

Be aware that your path and most of the other config will be ignored.
The remote command starts a middleware with exec and the dynamic config gets lost at this point. :-/

But in my opinion i might not a big problem to build an own remote approve service for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants