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

Feature/approve button #1150

Merged
merged 6 commits into from
Feb 21, 2020
Merged

Conversation

1276stella
Copy link
Contributor

  • Add the functionality in the browser report to approve a test
  • Fix eslint errors in one file
  • Update the readme doc

Approve a test
approve-btn-demo

Display an error message when approving a test fails
Screen Shot 2020-02-18 at 10 02 36 PM

Jia Li added 5 commits January 23, 2020 02:22
1. Fix indentation and space.
2. Remove unused fs import
3. Fix no-negated-in-lhs
availabeStatus could be derived from tests. Do not need to list it in state and reducer for now.
Comment on lines +7 to +8
const REMOTE_HOST = 'http://127.0.0.1';
const REMOTE_PORT = 3000;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an open issue in ember-backstop to make backstop run on a port other than the default port 3000. Will having this as a constant make it harder to implement that ?

Copy link
Owner

@garris garris Feb 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great point. When Backstop opens a report (either internally or via user on cli) it runs openReport.js -- notice here is where the port is defined...

const remoteReportUrl = `http://127.0.0.1:3000/${config.compareReportURL}?remote`;

So, we should be using your port bar there.

And it is probably just a matter of swapping that hard coded port 3000 with a dynamic one from the passed in config object.

AN ADDITIONAL THING TO NOTE: This also happens to be where we explicitly tell the report UI that it is in REMOTE mode. Some features, like Approve will only work in remote mode (i.e. when backstopRemote is running). I don't remember if the UI has a global variable to track this -- but it needs one. And the Approve option should not be shown unless we are in remote mode.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@1276stella ☝️

core/util/remote.js Outdated Show resolved Hide resolved
core/util/remote.js Outdated Show resolved Hide resolved
remote/index.js Outdated Show resolved Hide resolved
Copy link
Contributor

@shankarsridhar shankarsridhar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high level code review.

Copy link
Owner

@garris garris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do this.

@Alexbirvik
Copy link

Can you please say how to add approve button?

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

Successfully merging this pull request may close these issues.

4 participants