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 Brave Rewards browser tests #1804

Merged
merged 12 commits into from Apr 18, 2019
Merged

Add Brave Rewards browser tests #1804

merged 12 commits into from Apr 18, 2019

Conversation

@emerick
Copy link
Contributor

emerick commented Feb 28, 2019

Fix brave/brave-browser#3161
Requires brave/brave-ui#417

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Verified that these changes build without errors on
    • Windows
    • macOS
    • Linux
  • Verified that these changes pass automated tests (npm test brave_unit_tests && npm test brave_browser_tests) on
    • Windows
    • macOS
    • Linux
  • Verified that all lint errors/warnings are resolved (npm run lint)
  • Ran git rebase master (if needed).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.
  • Request a security/privacy review as needed.
  • Add appropriate QA labels (QA/Yes or QA/No) to include the closed issue in milestone

Test Plan:

npm test brave_unit_tests && npm test brave_browser_tests

Individual tests are described in detail in:
https://docs.google.com/document/d/1Mwu9STT-AYHVP7mgbmQkOXgYkdmKrPJTj8bYuLVK6nc

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
@emerick emerick self-assigned this Feb 28, 2019
@emerick emerick force-pushed the brave-rewards-browser-tests branch 4 times, most recently from 7b6699d to 7a0d8bd Feb 28, 2019
@bbondy bbondy changed the title Add Brave Rewards browser tests WIP: Add Brave Rewards browser tests Mar 1, 2019
@emerick emerick force-pushed the brave-rewards-browser-tests branch from 7a0d8bd to 2e7c3ca Mar 6, 2019
@emerick emerick changed the title WIP: Add Brave Rewards browser tests Add Brave Rewards browser tests Mar 7, 2019
@emerick emerick requested a review from NejcZdovc Mar 7, 2019
@emerick emerick force-pushed the brave-rewards-browser-tests branch 2 times, most recently from 623f82f to 929138e Mar 7, 2019
@emerick
Copy link
Contributor Author

emerick commented Mar 8, 2019

@NejcZdovc Officially ready for review!

@emerick emerick force-pushed the brave-rewards-browser-tests branch 3 times, most recently from bba6eaf to fe1494d Mar 8, 2019
Copy link
Collaborator

simonhong left a comment

Just left some comments.
Passing to @NejcZdovc for the rest.

@emerick emerick force-pushed the brave-rewards-browser-tests branch 3 times, most recently from 9bc199b to 9975e10 Mar 17, 2019
@NejcZdovc NejcZdovc requested a review from simonhong Mar 25, 2019
@NejcZdovc
Copy link
Member

NejcZdovc commented Mar 25, 2019

@emerick can you please rebase

@emerick emerick force-pushed the brave-rewards-browser-tests branch 2 times, most recently from 9210ef1 to f69a164 Mar 25, 2019
@emerick
Copy link
Contributor Author

emerick commented Mar 25, 2019

@NejcZdovc Sure, should be all set now.

@emerick emerick force-pushed the brave-rewards-browser-tests branch 3 times, most recently from fad7368 to db3d58a Apr 5, 2019
@emerick emerick force-pushed the brave-rewards-browser-tests branch 2 times, most recently from 637b9d2 to 5bc48d1 Apr 12, 2019
Copy link
Member

NejcZdovc left a comment

[70257:775:0412/175301.809834:INFO:CONSOLE(2171)] "[object Object]", source: chrome://rewards/brave_rewards.bundle.js (2171)
../../brave/components/brave_rewards/browser/rewards_service_browsertest.cc:693: Failure
Expected: (js_result.ExtractString().find(balance)) != (std::string::npos), actual: 18446744073709551615 vs 18446744073709551615
Stack trace:
0   libbase.dylib                       0x0000000131bc49ad base::debug::StackTrace::StackTrace(unsigned long) + 29
1   libbase.dylib                       0x0000000131bc4985 base::debug::StackTrace::StackTrace() + 37
2   brave_browser_tests                 0x000000010a93be4a StackTraceGetter::CurrentStackTrace(int, int) + 90
3   brave_browser_tests                 0x000000010a94c267 testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop(int) + 71
4   brave_browser_tests                 0x000000010a94bd41 testing::internal::AssertHelper::operator=(testing::Message const&) const + 145
5   brave_browser_tests                 0x0000000107bf6008 BraveRewardsBrowserTest::TipPublisher(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, bool) + 4104
6   brave_browser_tests                 0x0000000107bf4fab BraveRewardsBrowserTest_TipVerifiedPublisher_Test::RunTestOnMainThread() + 123
7   brave_browser_tests                 0x00000001108e9d17 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() + 743
8   brave_browser_tests                 0x00000001108ec34d void base::internal::FunctorTraits<void (content::BrowserTestBase::*)(), void>::Invoke<void (content::BrowserTestBase::*)(), content::BrowserTestBase*>(void (content::BrowserTestBase::*)(), content::BrowserTestBase*&&) + 125
9   brave_browser_tests                 0x00000001108ec251 void base::internal::InvokeHelper<false, void>::MakeItSo<void (content::BrowserTestBase::* const&)(), content::BrowserTestBase*>(void (content::BrowserTestBase::* const&)(), content::BrowserTestBase*&&) + 81
10  brave_browser_tests                 0x00000001108ec1d5 void base::internal::Invoker<base::internal::BindState<void (content::BrowserTestBase::*)(), base::internal::UnretainedWrapper<content::BrowserTestBase> >, void ()>::RunImpl<void (content::BrowserTestBase::* const&)(), std::__1::tuple<base::internal::UnretainedWrapper<content::BrowserTestBase> > const&, 0ul>(void (content::BrowserTestBase::* const&)(), std::__1::tuple<base::internal::UnretainedWrapper<content::BrowserTestBase> > const&, std::__1::integer_sequence<unsigned long, 0ul>) + 85
11  brave_browser_tests                 0x00000001108ec0fc base::internal::Invoker<base::internal::BindState<void (content::BrowserTestBase::*)(), base::internal::UnretainedWrapper<content::BrowserTestBase> >, void ()>::Run(base::internal::BindStateBase*) + 44
12  brave_browser_tests                 0x0000000108277c6d base::RepeatingCallback<void ()>::Run() const & + 61
13  brave_browser_tests                 0x000000010ef5d4ae ChromeBrowserMainParts::PreMainMessageLoopRunImpl() + 4974
14  brave_browser_tests                 0x000000010ef5c0a1 ChromeBrowserMainParts::PreMainMessageLoopRun() + 193
15  libcontent.dylib                    0x0000000140c65163 content::BrowserMainLoop::PreMainMessageLoopRun() + 243
16  libcontent.dylib                    0x0000000140c6ef9d int base::internal::FunctorTraits<int (content::BrowserMainLoop::*)(), void>::Invoke<int (content::BrowserMainLoop::*)(), content::BrowserMainLoop*>(int (content::BrowserMainLoop::*)(), content::BrowserMainLoop*&&) + 125
17  libcontent.dylib                    0x0000000140c6eea1 int base::internal::InvokeHelper<false, int>::MakeItSo<int (content::BrowserMainLoop::* const&)(), content::BrowserMainLoop*>(int (content::BrowserMainLoop::* const&)(), content::BrowserMainLoop*&&) + 81
18  libcontent.dylib                    0x0000000140c6ee25 int base::internal::Invoker<base::internal::BindState<int (content::BrowserMainLoop::*)(), base::internal::UnretainedWrapper<content::BrowserMainLoop> >, int ()>::RunImpl<int (content::BrowserMainLoop::* const&)(), std::__1::tuple<base::internal::UnretainedWrapper<content::BrowserMainLoop> > const&, 0ul>(int (content::BrowserMainLoop::* const&)(), std::__1::tuple<base::internal::UnretainedWrapper<content::BrowserMainLoop> > const&, std::__1::integer_sequence<unsigned long, 0ul>) + 85
19  libcontent.dylib                    0x0000000140c6ed1c base::internal::Invoker<base::internal::BindState<int (content::BrowserMainLoop::*)(), base::internal::UnretainedWrapper<content::BrowserMainLoop> >, int ()>::Run(base::internal::BindStateBase*) + 44
20  libcontent.dylib                    0x00000001415ff07d base::RepeatingCallback<int ()>::Run() const & + 61
21  libcontent.dylib                    0x0000000141f44fbd content::StartupTaskRunner::RunAllTasksNow() + 109
22  libcontent.dylib                    0x0000000140c634ba content::BrowserMainLoop::CreateStartupTasks() + 1370
23  libcontent.dylib                    0x0000000140c75614 content::BrowserMainRunnerImpl::Initialize(content::MainFunctionParams const&) + 1524
24  libcontent.dylib                    0x0000000140c5f38f content::BrowserMain(content::MainFunctionParams const&) + 143
25  libcontent.dylib                    0x00000001435f1376 content::RunBrowserProcessMain(content::MainFunctionParams const&, content::ContentMainDelegate*) + 134
26  libcontent.dylib                    0x00000001435f29d8 content::ContentMainRunnerImpl::RunServiceManager(content::MainFunctionParams&, bool) + 1240
27  libcontent.dylib                    0x00000001435f2418 content::ContentMainRunnerImpl::Run(bool) + 600
28  libcontent.dylib                    0x00000001435eee19 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() + 57
29  libembedder.dylib                   0x000000017f67b0a7 service_manager::Main(service_manager::MainParams const&) + 1607
30  libcontent.dylib                    0x00000001435f12a9 content::ContentMain(content::ContentMainParams const&) + 89
31  brave_browser_tests                 0x00000001108e9795 content::BrowserTestBase::SetUp() + 2325
@NejcZdovc NejcZdovc force-pushed the brave-rewards-browser-tests branch from 0ddf663 to 185614c Apr 15, 2019
@emerick emerick force-pushed the brave-rewards-browser-tests branch 2 times, most recently from e173d41 to 43abf96 Apr 15, 2019
@emerick emerick force-pushed the brave-rewards-browser-tests branch from b34ce50 to e7717a5 Apr 18, 2019
@NejcZdovc NejcZdovc added this to the 0.65.x - Nightly milestone Apr 18, 2019
@emerick emerick merged commit 6523053 into master Apr 18, 2019
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/jenkins/pr-head This commit cannot be built
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@emerick emerick deleted the brave-rewards-browser-tests branch Apr 18, 2019
@jasonrsadler jasonrsadler mentioned this pull request Apr 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.