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 import/export db for QA. Issue #9766. #5560

Merged
merged 2 commits into from
May 21, 2020
Merged

Conversation

gdregalo
Copy link
Contributor

@gdregalo gdregalo commented May 14, 2020

Resolves: brave/brave-browser#9766

Submitter Checklist:

Test Plan:

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@gdregalo gdregalo added feature/rewards CI/skip-linux CI/skip-macos-x64 Do not run CI builds for macOS x64 CI/skip-ios Do not run CI builds for iOS labels May 14, 2020
@gdregalo gdregalo added this to the 1.11.x - Nightly milestone May 14, 2020
@gdregalo gdregalo self-assigned this May 14, 2020
@gdregalo
Copy link
Contributor Author

Screenshot_20200514-182326

The publisher_info_db is exported from application internal folder to Download\rewards with timestamp suffix ("Export Rewards db" button).
To import: copy publisher_info_db Download\rewards (no timestamp suffix) and tap "Import Rewards db" button.

Copy link
Contributor

@samartnik samartnik left a comment

Choose a reason for hiding this comment

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

lgtm

@NejcZdovc
Copy link
Contributor

@gdregalo could we add notes to this actions, so that QA knowns where export will go and in which folder and what should be the name when importing?

Also could be that when you click import you are just prompt to select a file instead of fixed path?

@gdregalo
Copy link
Contributor Author

@NejcZdovc
Unfortunately Android app can write only in few public folders accessible from outside. I think, the "Download" is the most appropriate one. Choosing a file is possible. But I don't know how this is important for QA.

@NejcZdovc
Copy link
Contributor

@gdregalo qa has a lot of test data and if they can select file they can have files names per versions for example so no renaming is needed.

@samartnik samartnik force-pushed the android-export-db branch from 4ff8755 to 5449d97 Compare May 20, 2020 23:56
mImportRewardsDb = findPreference(QA_IMPORT_REWARDS_DB);
mExportRewardsDb = findPreference(QA_EXPORT_REWARDS_DB);
setRewardsDbClickListeners();
checkQACode();
Copy link
Contributor

Choose a reason for hiding this comment

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

Moved here for proper ACTION_GET_CONTENT handling. When it is onStart it request code additionaly, when file is chosen.

Copy link
Member

@SergeyZhukovsky SergeyZhukovsky left a comment

Choose a reason for hiding this comment

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

++

@samartnik samartnik merged commit 4a2fa45 into master May 21, 2020
@samartnik samartnik deleted the android-export-db branch May 21, 2020 10:58
@samartnik
Copy link
Contributor

In addition to QA options, export option was added to general Developer options section to be accessible for users.

device-2020-05-21-073654
device-2020-05-21-073622
device-2020-05-21-073640

@samartnik
Copy link
Contributor

Follow up PR for import is created here #5688

@srirambv
Copy link
Contributor

Verification passed on OnePlus 6T with Android 10 running 1.11.28 Nightly build

  • Verified able to export Rewards DB via developer options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/skip-ios Do not run CI builds for iOS CI/skip-macos-x64 Do not run CI builds for macOS x64 feature/rewards
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add import/export db for QA
5 participants