{
LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST");
bool ret_value;
- string value = null;
+ bool display_state;
- ret_value = Tizen.System.Information.TryGetValue<string>("tizen.org/feature/profile", out value);
- if (ret_value == true && value.CompareTo("tv") == 0)
+ ret_value = Tizen.System.Information.TryGetValue<bool>("tizen.org/feature/display.state", out display_state);
+ if (ret_value && !display_state)
{
isSupport = 0;
return;
[Property("CRITERIA", "EVL")]
[Property("AUTHOR", "Gattu Praveen Kumar, gattu.p@samsung.com")]
[Precondition(1, "Device display must be on")]
- [Precondition(2, "[Wearable Target] Set the display timeout as 15 seconds. The menu is here at Settings > Display > Screen Timeout.")]
+ [Precondition(2, "If a target is incapable of turning off the display, such as AlwaysOn, test will pass automatically")]
+ [Precondition(3, "[Wearable Target] Set the display timeout as 15 seconds. The menu is here at Settings > Display > Screen Timeout.")]
[Step(1, "Click run TC")]
[Step(2, "[Mobile Target] Press the powerkey button to turn off the display")]
[Step(3, "[Wearable Target] Wait until the display is turned off as much time as you set in the Precondition step")]
- [Step(4, "If you do not get pass, it is failed.")]
+ [Step(4, "[TV Target] Press the power button on the remote controller to turn off the display")]
+ [Step(5, "If you do not get pass, it is failed.")]
public async Task StateChanged_EVENT_CHECK()
{
if (PassForNotSuppot() == 1) return;
{
LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST");
bool ret_value;
- string value = null;
+ bool display_state;
- ret_value = Tizen.System.Information.TryGetValue<string>("tizen.org/feature/profile", out value);
- if (ret_value == true && value.CompareTo("tv") == 0)
+ ret_value = Tizen.System.Information.TryGetValue<bool>("tizen.org/feature/display.state", out display_state);
+ if (ret_value && !display_state)
{
isSupport = 0;
return;
[Property("CRITERIA", "PRE")]
[Property("AUTHOR", "Gattu Praveen Kumar, gattu.p@samsung.com")]
[Precondition(1, "Device Display must be on")]
- [Precondition(2, "[Wearable Target] Set the display timeout as 15 seconds. The menu is here at Settings > Display > Screen Timeout.")]
+ [Precondition(2, "If a target is incapable of turning off the display, such as AlwaysOn, test will pass automatically")]
+ [Precondition(3, "[Wearable Target] Set the display timeout as 15 seconds. The menu is here at Settings > Display > Screen Timeout.")]
[Step(1, "Click Run TC")]
[Step(2, "[Mobile Target] Press the powerkey button to turn off the display")]
[Step(3, "[Wearable Target] Wait until the display is turned off as much time as you set in the Precondition step")]
- [Step(4, "If you do not get pass, it is failed.")]
+ [Step(4, "[TV Target] Press the power button on the remote controller to turn off the display")]
+ [Step(5, "If you do not get pass, it is failed.")]
public async Task State_PROPERTY_READ_ONLY()
{
if (PassForNotSuppot() == 1) return;
[Description("Tizen.System.Display tests")]
class DisplayTests
{
- private int isDisplaySupport = 1;
+ private int isDisplaySupport = 0;
+ private int isDisplayStateSupport = 0;
private int isDisplayBrightnessSupport = 1;
[SetUp]
public void Init()
{
bool ret_value;
- string value = null;
+ bool value;
- ret_value = Tizen.System.Information.TryGetValue<string>("tizen.org/feature/profile", out value);
- if (ret_value == true && String.Compare(value, "tv", true) == 0)
+ ret_value = Tizen.System.Information.TryGetValue<bool>("tizen.org/feature/display", out value);
+ if (ret_value && value)
{
- isDisplaySupport = 0;
- return;
+ isDisplaySupport = 1;
+ }
+
+ ret_value = Tizen.System.Information.TryGetValue<bool>("tizen.org/feature/display.state", out value);
+ if (ret_value && value)
+ {
+ isDisplayStateSupport = 1;
}
try
}
else
{
- Assert.IsTrue(true, "display is not supported");
+ Assert.Pass("display is not supported");
}
}
}
else
{
- Assert.IsTrue(true, "display is not supported");
+ Assert.Pass("display is not supported");
}
}
}
else
{
- Assert.IsTrue(true, "display brightness is not supported");
+ Assert.Pass("display brightness is not supported");
}
}
[Property("AUTHOR", "Praveen Kumar Gattu, gattu.p@samsung.com")]
public void State_PROPERTY_READ_WRITE()
{
- if (isDisplaySupport == 1)
+ if (isDisplaySupport == 1 && isDisplayStateSupport == 1)
{
Display.State = DisplayState.Normal;
LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "State_READ Value:" + Display.State);
}
else
{
- Assert.IsTrue(true, "display is not supported");
+ Assert.Pass("display state is not supported");
}
}
}
else
{
- Assert.IsTrue(true, "display brightness is not supported");
+ Assert.Pass("display brightness is not supported");
}
}
}
else
{
- Assert.IsTrue(true, "display is not supported");
+ Assert.Pass("display is not supported");
}
}