lightning-browser-extension icon indicating copy to clipboard operation
lightning-browser-extension copied to clipboard

fix: trim invoice

Open im-adithya opened this issue 3 years ago • 7 comments

Describe the changes you have made in this PR

Trim the invoice

Link this PR to an issue

Fixes #1252

Type of change (Remove other not matching type)

  • fix: Bug fix (non-breaking change which fixes an issue)

How has this been tested?

Tested Manually

Checklist

  • [x] My code follows the style guidelines of this project and performed a self-review of my own code
  • [x] New and existing tests pass locally with my changes
  • [x] I checked if I need to make corresponding changes to the documentation (and made those changes if needed)

im-adithya avatar Aug 12 '22 15:08 im-adithya

🚀 Thanks for the pull request!

Here are the current build files for testing:

Download and unzip the file for your browser. Refer to the readme for detailed install instructions.


This build is brought to you by: secondl1ght (who recently dropped 100 sats):


Want to sponsor the next build? send some sats to ⚡️[email protected] (don't forget to provide your name)

Don't forget: keep stacking sats!

github-actions[bot] avatar Aug 12 '22 16:08 github-actions[bot]

Is it possible to add a test for this?

escapedcat avatar Aug 13 '22 02:08 escapedcat

I think we'll have to add a check for this after adding e2e tests for app screens

im-adithya avatar Aug 13 '22 09:08 im-adithya

Is it possible to create a unit test which types in an address with spaces and the value will only be the address?

  • Pro: We have a basic unit test for this component
  • Contra: We're testing if trim works...

escapedcat avatar Aug 13 '22 09:08 escapedcat

Not sure if we can add a unit test as we'll have to enter a value and then check... we do all that in e2e, right?

im-adithya avatar Aug 13 '22 13:08 im-adithya

Not sure if we can add a unit test as we'll have to enter a value and then check... we do all that in e2e, right?

Currently we do not have e2e tests for this.
Regarding a unit-test I thought we could do i.e. type(" abc ") and expect(...toHaveValue("abc")) after.
Does this make sense to you?

escapedcat avatar Aug 14 '22 02:08 escapedcat

With the added commit form bumi let's add a unit-test. I can support with that.

escapedcat avatar Aug 14 '22 09:08 escapedcat

Thanks!

escapedcat avatar Aug 16 '22 06:08 escapedcat