Created
April 24, 2021 15:20
-
-
Save manvillej/aa0dc3aa9374d0fa64e80d6f531ab55c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ATFGraphQLAPI = { | |
atfTestToJson: function(test){ | |
return { | |
"active": test.getDisplayValue("active"), | |
"sys_id": test.getValue("sys_id"), | |
"name": test.getValue("name"), | |
"description": test.getValue("description") | |
}; | |
}, | |
atfTestResultToJson: function(testResult){ | |
return { | |
"id": testResult.getUniqueValue(), | |
"pending": testResult.getValue("pending_time"), | |
"duration": testResult.getValue("run_time"), | |
"startTime": testResult.getValue("start_time"), | |
"endTime": testResult.getValue("end_time"), | |
"output": testResult.getValue("output"), | |
"status": testResult.getValue("status"), | |
"userAgents": testResult.getValue("user_agents") | |
}; | |
}, | |
atfTestSuiteResultToJson: function(Suite){ | |
return { | |
"id": Suite.getUniqueValue(), | |
"name": Suite.getValue("name"), | |
"active": Suite.getValue("active"), | |
"filter": Suite.getValue("input_filter"), | |
"description": Suite.getValue("description"), | |
"parent": Suite.getValue("parent") | |
}; | |
}, | |
type: 'ATFGraphQLAPI' | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment