Added method to detect OS type. Needed for testing.

This commit is contained in:
NissimHadar 2018-11-01 16:57:28 -07:00
parent ebc37610d3
commit d851720cb0
2 changed files with 16 additions and 0 deletions

View file

@ -198,4 +198,14 @@ void TestScriptingInterface::setOtherAvatarsReplicaCount(int count) {
int TestScriptingInterface::getOtherAvatarsReplicaCount() {
return qApp->getOtherAvatarsReplicaCount();
}
QString TestScriptingInterface::getOperatingSystemType() {
#ifdef Q_OS_WIN
return "WINDOWS";
#elif #defined Q_MAC_OS
return "MACOS";
#else
return "UNKNOWN";
#endif
}

View file

@ -163,6 +163,12 @@ public slots:
*/
Q_INVOKABLE int getOtherAvatarsReplicaCount();
/**jsdoc
* Returns the Operating Sytem type
* @function Test.getOperatingSystemType
*/
QString getOperatingSystemType();
private:
bool waitForCondition(qint64 maxWaitMs, std::function<bool()> condition);
QString _testResultsLocation;