Skip to content

Commit 72a465c

Browse files
hydraxmanshbu
andauthored
Remove the launcher unset operation in device level and move it to test task level in runner (#225)
Co-authored-by: shbu <shaopeng@microsoft.com>
1 parent 05069f6 commit 72a465c

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

agent/src/main/java/com/microsoft/hydralab/agent/runner/TestRunner.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ protected void tearDown(DeviceInfo deviceInfo, TestTask testTask, TestRun testRu
150150
}
151151
}
152152
deviceManager.testDeviceUnset(deviceInfo, testRun.getLogger());
153+
if (testTask.isThisForMicrosoftLauncher()) {
154+
unsetForMicrosoftLauncherApp(deviceInfo, testRun.getLogger());
155+
}
153156
//execute actions
154157
if (testTask.getDeviceActions() != null) {
155158
testRun.getLogger().info("Start executing tearDown actions.");
@@ -177,6 +180,13 @@ private void presetForMicrosoftLauncherApp(DeviceInfo deviceInfo, TestTask testT
177180
ThreadUtils.safeSleep(3000);
178181
}
179182

183+
private void unsetForMicrosoftLauncherApp(DeviceInfo deviceInfo, Logger reportLogger) {
184+
reportLogger.info("unsetForMicrosoftLauncherApp: unset all the log tags");
185+
deviceManager.setProperty(deviceInfo, "log.tag.WelcomeScreen", " ", reportLogger);
186+
deviceManager.setProperty(deviceInfo, "log.tag.ConsentDialog", " ", reportLogger);
187+
deviceManager.setProperty(deviceInfo, "log.tag.WhatsNewDialog", " ", reportLogger);
188+
deviceManager.setProperty(deviceInfo, "log.tag.NoneCheckUpdates", " ", reportLogger);
189+
}
180190

181191
protected void reInstallApp(DeviceInfo deviceInfo, TestTask testTask, Logger reportLogger) throws Exception {
182192
if (testTask.getRequireReinstall() || deviceManager instanceof IOSDeviceManager) {

common/src/main/java/com/microsoft/hydralab/common/management/impl/AndroidDeviceManager.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -699,11 +699,6 @@ public void testDeviceSetup(@NotNull DeviceInfo deviceInfo, Logger logger) throw
699699

700700
@Override
701701
public void testDeviceUnset(DeviceInfo deviceInfo, Logger logger) {
702-
setProperty(deviceInfo, "log.tag.WelcomeScreen", " ", logger);
703-
setProperty(deviceInfo, "log.tag.ConsentDialog", " ", logger);
704-
setProperty(deviceInfo, "log.tag.WhatsNewDialog", " ", logger);
705-
setProperty(deviceInfo, "log.tag.NoneCheckUpdates", " ", logger);
706-
707702
changeGlobalSetting(deviceInfo, "window_animation_scale", "1", logger);
708703
changeGlobalSetting(deviceInfo, "transition_animation_scale", "1", logger);
709704
changeGlobalSetting(deviceInfo, "animator_duration_scale", "1", logger);

0 commit comments

Comments
 (0)