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

QA: Only display multiplier details if not 1.0 #48

Open
web4er opened this issue Jul 31, 2023 · 32 comments
Open

QA: Only display multiplier details if not 1.0 #48

web4er opened this issue Jul 31, 2023 · 32 comments

Comments

@web4er
Copy link
Owner

web4er commented Jul 31, 2023

Steps for each test

  • describe the test
  • set multiplier if needed
  • assign
  • unassign to perform next test
@web4er
Copy link
Owner Author

web4er commented Jul 31, 2023

TEST

should not display any multiplier info to a normal bounty hunter with default multiplier settings

@EresDev
Copy link

EresDev commented Jul 31, 2023

/assign

@web4er-ubiquibot
Copy link

Deadline Mon, 31 Jul 2023 13:13:02 UTC
Registered Wallet Please set your wallet address to use `/wallet 0x0000...0000`
Tips:
  • Use /wallet 0x0000...0000 if you want to update your registered payment wallet address @user.
  • Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
  • Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the bounty.

    @EresDev
    Copy link

    EresDev commented Jul 31, 2023

    /unassign

    @web4er-ubiquibot
    Copy link

    You have been unassigned from the bounty @EresDev

    @web4er
    Copy link
    Owner Author

    web4er commented Jul 31, 2023

    TEST

    If the multiplier is not 1.0 then show the multiplier number, reason, and total.

    @web4er
    Copy link
    Owner Author

    web4er commented Jul 31, 2023

    /multiplier 0.7 @web4er "testing"

    @web4er-ubiquibot
    Copy link

    Successfully changed the payout multiplier for @web4er to 0.7. The reason provided is "testing".

    @web4er
    Copy link
    Owner Author

    web4er commented Jul 31, 2023

    /assign

    @web4er-ubiquibot
    Copy link

    Deadline Mon, 31 Jul 2023 13:15:15 UTC
    Registered Wallet 0x1F9FCc0E84dc2094499b848AE37Cd6a51db03Ff2
    Payment Multiplier0.70
    Multiplier Reasontesting
    Total Bounty8750 USD
    Tips:
    • Use /wallet 0x0000...0000 if you want to update your registered payment wallet address @user.
    • Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
    • Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the bounty.

      @web4er
      Copy link
      Owner Author

      web4er commented Jul 31, 2023

      /unassign

      @web4er-ubiquibot
      Copy link

      You have been unassigned from the bounty @web4er

      @web4er
      Copy link
      Owner Author

      web4er commented Jul 31, 2023

      TEST

      If the multiplier is 1.0 and a reason is set, show all the multiplier details, but don't show the total.

      @web4er
      Copy link
      Owner Author

      web4er commented Jul 31, 2023

      /multiplier 1 @web4er "testing again"

      @web4er-ubiquibot
      Copy link

      Successfully changed the payout multiplier for @web4er to 1. The reason provided is "testing again".

      @web4er
      Copy link
      Owner Author

      web4er commented Jul 31, 2023

      /assign

      @web4er-ubiquibot
      Copy link

      Deadline Mon, 31 Jul 2023 13:18:06 UTC
      Registered Wallet 0x1F9FCc0E84dc2094499b848AE37Cd6a51db03Ff2
      Payment Multiplier1.00
      Multiplier Reasontesting again
      Tips:
      • Use /wallet 0x0000...0000 if you want to update your registered payment wallet address @user.
      • Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
      • Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the bounty.

        @web4er
        Copy link
        Owner Author

        web4er commented Jul 31, 2023

        TEST

        don't show any multiplier info when message is set as an empty string and multiplier is 1

        This basically brings back the default mode, when nothing was done to a hunter's multiplier.

        @web4er
        Copy link
        Owner Author

        web4er commented Jul 31, 2023

        /multiplier 1 @web4er ""

        @web4er-ubiquibot
        Copy link

        Successfully changed the payout multiplier for @web4er to 1. The reason is not provided.

        @web4er
        Copy link
        Owner Author

        web4er commented Jul 31, 2023

        /unassign

        @web4er-ubiquibot
        Copy link

        You have been unassigned from the bounty @web4er

        @web4er
        Copy link
        Owner Author

        web4er commented Jul 31, 2023

        /assign

        @web4er-ubiquibot
        Copy link

        Deadline Mon, 31 Jul 2023 13:22:12 UTC
        Registered Wallet 0x1F9FCc0E84dc2094499b848AE37Cd6a51db03Ff2
        Tips:
        • Use /wallet 0x0000...0000 if you want to update your registered payment wallet address @user.
        • Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
        • Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the bounty.

          @web4er
          Copy link
          Owner Author

          web4er commented Jul 31, 2023

          /unassign

          @web4er-ubiquibot
          Copy link

          You have been unassigned from the bounty @web4er

          @0x4007
          Copy link

          0x4007 commented Aug 4, 2023

          /multiplier 1 @web4er ""

          I'm curious about this one.

          You should be able to set your multiplier and not add an empty string, for example,

          /multiplier @pavlovcik 1

          Should be the correct way to not set a reason. Technically because you set an empty string, shouldn't the reason be an empty string instead of null? In which case shouldn't the reason render?

          I actually do like this result, where the bot understands that an empty string means null but still just curious about it.

          @web4er
          Copy link
          Owner Author

          web4er commented Aug 4, 2023

          Yes, you can skip the reason from the command and it will work as it was working before. Writing some tests for this below.

          I don't know if it was intentional, but one thing I didn't like in the code was, appending an empty space to the reason. This was before my changes:

          reason += part.replace(/['"]/g, "") + " ";

          This creates confusion in the code because when you provide "" as a reason, it stores it as " " (notice the space). And they evaluate to different booleans. ""==false and " "==true when it is checked in different places in the code.

          With my change "" will be treated as "no reason provided". If you want to have an empty reason, you can explicitly provide it with a space " " or maybe something even more explicit "N/A" or "Not Applicable" when you don't want to have a reason.
          @pavlovcik

          @web4er
          Copy link
          Owner Author

          web4er commented Aug 4, 2023

          /multiplier @web4er 1

          @web4er-ubiquibot
          Copy link

          Successfully changed the payout multiplier for @web4er to 1. The reason is not provided.

          @0x4007
          Copy link

          0x4007 commented Aug 4, 2023

          I don't know if it was intentional, but one thing I didn't like in the code was, appending an empty space to the reason.

          It is unlikely to be intentional. Perhaps we should fix it!

          By the way, can you send me a message on Telegram? We could use your attention to detail to help with some QA efforts!

          @web4er
          Copy link
          Owner Author

          web4er commented Aug 5, 2023

          It is unlikely to be intentional. Perhaps we should fix it!

          The pull request with this QA fixes it.

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

          No branches or pull requests

          3 participants