Skip to content

fix: test for Google Analytics message - cli#3536 #114

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

Merged
merged 3 commits into from
Jun 7, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/build/common/logtrace_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,17 @@ def test_101_create_project_log_trace(self):

def test_102_platform_add_log_trace(self):
Tns.create_app(self.app_name, update_modules=False)

# Disable tracking in Google Analytics https://github.com/NativeScript/nativescript-cli/issues/3536
Tns.run_tns_command("usage-reporting disable")
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we disable usage reporting before all tests.
Not sure what will happen if it is disabled and we disable it again (it might be ok, just need to check it).

Here we do some enable/disable:
https://github.com/NativeScript/nativescript-cli-tests/blob/master/tests/build/common/usage_reporting_tests.py

May be we can move/extend tests there (all tests in UsageReportingTests class are specially for this feature).


output = Tns.platform_add_android(attributes={"--path": self.app_name}, log_trace=True)
assert "Looking for project in" in output
assert "Project directory is" in output
assert "Package: " + self.app_id in output
assert "Installed Android Targets" in output
assert "Using Android SDK" in output
assert "Project successfully created" in output

# Check there is no any messages for tracking in Google Analytics
assert "Will send the following information to Google Analytics" not in output