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

Add crypto template and tests #149

Merged
merged 1 commit into from Oct 15, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Add crypto template and tests

  • Loading branch information
srirambv committed Oct 14, 2019
commit e84eed3eb62b700bf0da73e8ffa69a2d9ea8fb85
@@ -34,6 +34,7 @@
android_x86_checklist = []
android_arm_checklist = []
android_tab_checklist = []
crypto_wallet_checklist = []

laptop_milestone = {}
for laptopmilestone in laptop_repo.get_milestones(state="open"):
@@ -57,8 +58,12 @@
key2 = sorted(laptop_milestone.keys())[1]
key3 = sorted(laptop_milestone.keys())[2]
key4 = sorted(laptop_milestone.keys())[3]
# key5 = sorted(laptop_milestone.keys())[4]

ethmilestone = [s for s in laptop_milestone if "Ethereum" in s]
if (len(ethmilestone) == 0):
ethkey = ""
else:
ethkey = ethmilestone[0]

def laptop_testruns(milestonever):

@@ -227,17 +232,6 @@ def laptop_perrel_checklist(milestonever):
"OS/Windows" not in label_names and
"OS/macOS" not in label_names):
linux_checklist.append(output_line)

# print("Release Notes ")
# for line in release_notes:
# print(line)
# print("")

# print("Checklist: ")
# for line in checklist:
# print(line)
# print("")

print("Mac Checklist:")
bigline = "## Per release specialty tests\n"
for line in mac_checklist:
@@ -663,6 +657,121 @@ def android_testruns():
return


def cryptowallet_testruns(milestonever):

wikitemplate_crypto = open("wikitemplate-crypto.md", "r")
cryptowallet_template = wikitemplate_crypto.read()

for issue in laptop_repo.get_issues(
milestone=laptop_milestone[milestonever], sort="created",
direction="asc", state="closed"):
if("pull" not in issue.html_url):
original_issue_title = issue.title
issue_title = original_issue_title
if(original_issue_title[0].islower()):
lower = original_issue_title[0]
upper = original_issue_title[0].upper()
issue_title = original_issue_title.replace(lower, upper, 1)

labels = issue.get_labels()
label_names = []

for label in labels:
label_names.append(label.name)
if("release-notes/include" in label_names and
"feature/crypto-wallets" in label_names and
"QA/No" not in label_names and
"tests" not in label_names):
output_line = " - " + issue_title + ".([#" +\
str(issue.number) + "](" + issue.html_url + "))"
release_notes.append(output_line)

if("QA/Yes" in label_names and "QA/No" not in label_names and
"tests" not in label_names):
output_line = " - [ ] " + issue_title + ".([#" +\
str(issue.number) + "](" + issue.html_url + "))"
checklist.append(output_line)
if("QA Pass-macOS" not in label_names and
"feature/crypto-wallets" in label_names and
"OS/Windows" not in label_names and
"OS/Linux" not in label_names and
"QA/No" not in label_names and
"tests" not in label_names):
mac_checklist.append(output_line)

if("QA Pass-Win64" not in label_names and
"feature/crypto-wallets" in label_names and
"OS/macOS" not in label_names and
"OS/Linux" not in label_names and
"QA/No" not in label_names and
"tests" not in label_names):
win64_checklist.append(output_line)

if("QA Pass-Linux" not in label_names and
"feature/crypto-wallets" in label_names and
"OS/Windows" not in label_names and
"OS/macOS" not in label_names and
"QA/No" not in label_names and
"tests" not in label_names):
linux_checklist.append(output_line)

print("Mac Checklist:\n")
bigline = "## Per release specialty tests\n"
for line in mac_checklist:
bigline += line + "\n"
bigline = bigline + cryptowallet_template
print(bigline)
print("")
macTitle = "Manual test run on OS X for " + milestonever
macList = ["OS/macOS", "release-notes/exclude", "tests", "QA/Yes"]

if args.test is None:
laptop_repo.create_issue(title=macTitle,
body=bigline,
assignee="kjozwiak",
milestone=laptop_milestone[milestonever],
labels=macList)

print("Win64 Checklist:\n")
bigline = "## Per release specialty tests\n"
for line in win64_checklist:
bigline += line + "\n"
bigline = bigline + cryptowallet_template
print(bigline)
print("")
winTitle = "Manual test run on Windows x64 for " + milestonever
winList = ["OS/Windows", "release-notes/exclude", "tests", "QA/Yes"]

if args.test is None:
laptop_repo.create_issue(title=winTitle,
body=bigline,
assignee="srirambv",
milestone=laptop_milestone[milestonever],
labels=winList)

print("Linux Checklist:\n")
bigline = "## Per release specialty tests\n"
for line in linux_checklist:
bigline += line + "\n"
bigline = bigline + cryptowallet_template
print(bigline)
print("")
linTitle = "Manual test run on Linux for " + milestonever
linList = ["OS/unix-like/linux",
"release-notes/exclude",
"tests",
"QA/Yes"]

if args.test is None:
laptop_repo.create_issue(title=linTitle,
body=bigline,
assignee="srirambv",
milestone=laptop_milestone[milestonever],
labels=linList)

return 0


print("*********************************************************************"
"*****************************************************")
print(" Few things to check before generating test"
@@ -683,7 +792,8 @@ def android_testruns():
laptop_per = print("2. Laptop Per-release Checklist")
laptop_hf = print("3. Laptop HotFix Checklist")
ios = print("4. iOS")
android = print("5. Android\n")
android = print("5. Android")
cryptowallet = print("6. Brave Crypto Wallet - Ethereum Client\n")

select_checklist = input("Choose the platform for which you want to" +
" generate the test run: ")
@@ -718,11 +828,6 @@ def android_testruns():
str(sorted(laptop_milestone.keys())[3]) + " on all platforms")
print(sorted(laptop_milestone.keys())[3])
laptop_testruns(key4)
# elif(select_checklist == "1" and generate_test == "5"):
# print("\nGenerating test runs for " +
# str(sorted(laptop_milestone.keys())[4]) + " on all platforms")
# print(sorted(laptop_milestone.keys())[4])
# laptop_testruns(key5)
elif(select_checklist == "2" and generate_test == "1"):
print("\nGenerating Per-release checklist for " +
str(sorted(laptop_milestone.keys())[0]) + " on all platforms")
@@ -743,11 +848,6 @@ def android_testruns():
str(sorted(laptop_milestone.keys())[3]) + " on all platforms")
print(sorted(laptop_milestone.keys())[3])
laptop_perrel_checklist(key4)
# elif(select_checklist == "2" and generate_test == "5"):
# print("\nGenerating Per-release checklist for " +\
# str(sorted(laptop_milestone.keys())[4]) + " on all platforms")
# print(sorted(laptop_milestone.keys())[4])
# laptop_perrel_checklist(key5)
else:
print("Nothing to create in this milestone. Run the script again.")
exit()
@@ -757,13 +857,20 @@ def android_testruns():
print(sorted(laptop_milestone.keys())[0])
laptop_hf_testruns(key1)
elif (select_checklist == "4"):
generate_ios_test = print("Generating test runs for iOS ",
generate_ios_test = print("\nGenerating test runs for iOS ",
sorted(ios_milestone.keys())[0])
ios_testruns()
elif (select_checklist == "5"):
generate_android_test = print("Generating test runs for android",
generate_android_test = print("\nGenerating test runs for android",
sorted(android_milestone.keys())[0])
android_testruns()
elif (select_checklist == "6"):
if (ethkey == ""):
print("No open milestone to generate tests")
else:
generate_cryptowallet_test = print("\nGenerating test runs for "
"Brave Crypto wallet release " + ethkey)
cryptowallet_testruns(ethkey)
else:
print("Incorrect selection. Exiting test creation...")
exit()
@@ -0,0 +1,34 @@

## Branding

- [ ] Verify there are no appearances of the word MetaMask
- [ ] Verify links to MetaMask resources such as websites and email should point to Brave resources
- [ ] Verify all downloadable resources (Seed/Logs) contains Brave file names
- [ ] Verify MetaFox logo is not present on any screen

## Component

- [ ] Verify Ethereum client component is downloaded when you open brave://wallet for the first time
- [ ] Verify Ethereum client component is successfully updated and doesn't corrupt the browser wallet
- [ ] Delete component folder. Verify the component is downloaded successfully after browser relaunch

## Ðapps

- [ ] Verify Ðapp can successfully connect to your crypto wallets account, signed via a pop-up notification
- [ ] Verify Ðapp transactions where assets are set/received show up in the account activity view within the extension

## Import & Recovery

- [ ] Verify you can import Brave Crypto Wallet using 24 seed words
- [ ] Verify you can import MetaMask Wallet using only 12 seed words

## Transactions

- [ ] Verify Eth/ERC-20 tokens can be received at the addresses generated for your account
- [ ] Verify Eth/ERC-20 tokens can be sent to other addresses from your account
- [ ] Verify a successful transaction can be done on a restored wallet

## Hardware

- [ ] Verify you can link hardware wallet using Trezor and unlock the wallet
- [ ] Verify you can link hardware wallet using Ledger Nano and unlock the wallet
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.