Skip to content

Commit

Permalink
Merge branch 'main' into dans-live-api
Browse files Browse the repository at this point in the history
  • Loading branch information
diemol authored Aug 14, 2024
2 parents 0c720dc + 05f332b commit 9296e95
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 3,016 deletions.
2,665 changes: 0 additions & 2,665 deletions apis/rdc.json

This file was deleted.

297 changes: 0 additions & 297 deletions docs/interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,303 +265,6 @@ The following commands are available via package or cli tool:
<br><h4>Options</h4>
<ul> <li><b>App-Type</b>: Application type</li> <li><b>App-Identifier</b>: Your custom unique identifier for your app</li> <li><b>App-DisplayName</b>: Your custom display name</li> <li><b>App-Active</b>: If true makes uploaded application active one</li> <li><b>body</b>: No description available.</li> </ul> </td>
</tr>
<tr>
<td>
<b>PUT</b> <code>/v1/appium/session/{sessionId}/skiptest</code><br>
Report the result of a test as skipped.
<h3>Example:</h3>
<code>api.markTestAsSkippedDeprecated(sessionId)</code>
</td>
</tr>
<tr>
<td>
<b>PUT</b> <code>/v1/appium/session/{sessionId}/test</code><br>
Report the result of a test.
<h3>Example:</h3>
<code>api.updateTestDeprecated(sessionId, { ...options })</code>
<br><h4>Options</h4>
<ul> <li><b>body</b>: No description available.</li> </ul> </td>
</tr>
<tr>
<td>
<b>PUT</b> <code>/v1/appium/suites/{batchId}</code><br>
Updates the properties of a suite.
<h3>Example:</h3>
<code>api.updateSuiteDeprecated(suiteId, { ...options })</code>
<br><h4>Options</h4>
<ul> <li><b>body</b>: No description available.</li> </ul> </td>
</tr>
<tr>
<td>
<b>GET</b> <code>/v1/appium/suites/{batchId}/deviceIds</code><br>
Returns the IDs of the devices which you had selected for the specified suite.
<h3>Example:</h3>
<code>api.readDeviceIdsDeprecated(suiteId)</code>
</td>
</tr>
<tr>
<td>
<b>POST</b> <code>/v1/appium/suites/{batchId}/reports/start</code><br>
Start a new suite execution including its test executions.
<h3>Example:</h3>
<code>api.startSuiteDeprecated(suiteId, { ...options })</code>
<br><h4>Options</h4>
<ul> <li><b>appId</b>: The ID of the app version you wish to test</li> <li><b>body</b>: No description available.</li> </ul> </td>
</tr>
<tr>
<td>
<b>PUT</b> <code>/v1/appium/suites/{batchId}/reports/{batchReportId}/finish</code><br>
Marks all test executions contained in the specified suite execution as finished.
<h3>Example:</h3>
<code>api.finishSuiteDeprecated(suiteId, batchReportId)</code>
</td>
</tr>
<tr>
<td>
<b>PUT</b> <code>/v1/appium/suites/{batchId}/reports/{batchReportId}/results/{testReportId}/finish</code><br>
Sets the status of the specific test execution and marks it as finished.
<h3>Example:</h3>
<code>api.finishTestReportDeprecated(suiteId, suiteReportId, testReportId, { ...options })</code>
<br><h4>Options</h4>
<ul> <li><b>body</b>: No description available.</li> </ul> </td>
</tr>
<tr>
<td>
<b>PUT</b> <code>/v1/appium/suites/{batchId}/reports/{batchReportId}/results/{testReportId}/skip</code><br>
Mark test execution as skipped
<h3>Example:</h3>
<code>api.skipTestReportDeprecated(suiteId, suiteReportId, testReportId)</code>
</td>
</tr>
<tr>
<td>
<b>GET</b> <code>/v1/devices</code><br>
Returns a list containing all devices, including those not currently available for testing
<h3>Example:</h3>
<code>api.getDescriptorsDeprecated()</code>
</td>
</tr>
<tr>
<td>
<b>GET</b> <code>/v1/devices/all</code><br>
Returns a list containing all devices, including those not currently unavailable for testing.
This endpoint requires API Key authentication and will also return your private devices.
<h3>Example:</h3>
<code>api.getDescriptorsApiDeprecated()</code>
</td>
</tr>
<tr>
<td>
<b>GET</b> <code>/v1/devices/all/available</code><br>
Returns a list containing the IDs of all devices currently available for testing.
This endpoint requires API Key authentication and will also return your private devices.
<h3>Example:</h3>
<code>api.getAvailableDescriptorIdsApiDeprecated()</code>
</td>
</tr>
<tr>
<td>
<b>GET</b> <code>/v1/devices/available</code><br>
Returns a list containing the IDs of all devices currently available for testing
<h3>Example:</h3>
<code>api.getAvailableDescriptorIdsDeprecated()</code>
</td>
</tr>
<tr>
<td>
<b>GET</b> <code>/v1/devices/reports</code><br>
The session history reports provide information about user sessions. This includes device usage and test reports. By default reports of the last 30 days will be retrieved - limited to a maximum of 50 reports.
If the authenticated user is the owner of the account, session reports of the entire team will be retrieved. Team members can only retrieve their own session history. This endpoint requires Password authentication.
<h3>Example:</h3>
<code>api.getSessionReports({ ...options })</code>
<br><h4>Options</h4>
<ul> <li><b>userId</b>: Your username.</li> <li><b>lastDays</b>: Number of days to report</li> <li><b>offset</b>: Offset for pagination</li> <li><b>limit</b>: Max number of results per page</li> </ul> </td>
</tr>
<tr>
<td>
<b>GET</b> <code>/v1/devices/{deviceDescriptorId}</code><br>
Returns information for a particular device.
This endpoint requires API Key authentication.
<h3>Example:</h3>
<code>api.getDescriptorDeprecated(deviceId)</code>
</td>
</tr>
<tr>
<td>
<b>GET</b> <code>/v1/devices/{deviceDescriptorId}/status</code><br>
Returns a list containing device status infos for all device instances with the specified device ID on all pools.
This endpoint requires API Key authentication and will also return your private devices.
<h3>Example:</h3>
<code>api.getDeviceStatusInfosDeprecated(deviceId)</code>
</td>
</tr>
<tr>
<td>
<b>PUT</b> <code>/v2/appium/session/{sessionId}/skiptest</code><br>
Report the result of a test as skipped.
<h3>Example:</h3>
<code>api.markTestAsSkipped(sessionId)</code>
</td>
</tr>
<tr>
<td>
<b>PUT</b> <code>/v2/appium/session/{sessionId}/test</code><br>
Report the result of a test.
<h3>Example:</h3>
<code>api.updateTest(sessionId, { ...options })</code>
<br><h4>Options</h4>
<ul> <li><b>body</b>: No description available.</li> </ul> </td>
</tr>
<tr>
<td>
<b>PUT</b> <code>/v2/appium/suites/{batchId}</code><br>
Updates the properties of a suite.
<h3>Example:</h3>
<code>api.updateSuite(suiteId, { ...options })</code>
<br><h4>Options</h4>
<ul> <li><b>body</b>: No description available.</li> </ul> </td>
</tr>
<tr>
<td>
<b>GET</b> <code>/v2/appium/suites/{batchId}/deviceIds</code><br>
Returns the IDs of the devices which you had selected for the specified suite.
<h3>Example:</h3>
<code>api.readDeviceIds(suiteId)</code>
</td>
</tr>
<tr>
<td>
<b>POST</b> <code>/v2/appium/suites/{batchId}/reports/start</code><br>
Start a new suite execution including its test executions.
<h3>Example:</h3>
<code>api.startSuite(suiteId, { ...options })</code>
<br><h4>Options</h4>
<ul> <li><b>appId</b>: The ID of the app version you wish to test</li> <li><b>body</b>: No description available.</li> </ul> </td>
</tr>
<tr>
<td>
<b>PUT</b> <code>/v2/appium/suites/{batchId}/reports/{batchReportId}/finish</code><br>
Marks all test executions contained in the specified suite execution as finished.
<h3>Example:</h3>
<code>api.finishSuite(suiteId, batchReportId)</code>
</td>
</tr>
<tr>
<td>
<b>PUT</b> <code>/v2/appium/suites/{batchId}/reports/{batchReportId}/results/{testReportId}/finish</code><br>
Sets the status of the specific test execution and marks it as finished.
<h3>Example:</h3>
<code>api.finishTestReport(suiteId, suiteReportId, testReportId, { ...options })</code>
<br><h4>Options</h4>
<ul> <li><b>body</b>: No description available.</li> </ul> </td>
</tr>
<tr>
<td>
<b>PUT</b> <code>/v2/appium/suites/{batchId}/reports/{batchReportId}/results/{testReportId}/skip</code><br>
Mark test execution as skipped
<h3>Example:</h3>
<code>api.skipTestReport(suiteId, suiteReportId, testReportId)</code>
</td>
</tr>
<tr>
<td>
<b>GET</b> <code>/v2/batchReports/{batchReportId}</code><br>
Returns the test report of a suite
<h3>Example:</h3>
<code>api.readBatchReport({ ...options })</code>
<br><h4>Options</h4>
<ul> <li><b>body</b>: No description available.</li> <li><b>body</b>: No description available.</li> </ul> </td>
</tr>
<tr>
<td>
<b>GET</b> <code>/v2/batchReports/{batchReportId}/xml</code><br>
Returns the test report of a suite as XML
<h3>Example:</h3>
<code>api.junitStyleXmlReport({ ...options })</code>
<br><h4>Options</h4>
<ul> <li><b>body</b>: No description available.</li> <li><b>body</b>: No description available.</li> </ul> </td>
</tr>
<tr>
<td>
<b>GET</b> <code>/v2/devices</code><br>
Returns a list per data center containing all devices, including private devices and those not currently available for testing. This endpoint requires API Key authentication.
<h3>Example:</h3>
<code>api.getDescriptors()</code>
</td>
</tr>
<tr>
<td>
<b>GET</b> <code>/v2/devices/available</code><br>
Returns a list per data center containing the IDs of all devices currently available for testing, including private devices. This endpoint requires API Key authentication.
<h3>Example:</h3>
<code>api.getAvailableDescriptorIds()</code>
</td>
</tr>
<tr>
<td>
<b>GET</b> <code>/v2/devices/{deviceDescriptorId}</code><br>
Returns information for a particular device per data center. This endpoint requires API Key authentication.
<h3>Example:</h3>
<code>api.getDescriptor(deviceId)</code>
</td>
</tr>
<tr>
<td>
<b>GET</b> <code>/v2/logs/{testReportId}/appium</code><br>
Returns Appium log for the specified test report
<h3>Example:</h3>
<code>api.readAppiumLog(testReportId)</code>
</td>
</tr>
<tr>
<td>
<b>GET</b> <code>/v2/logs/{testReportId}/device</code><br>
Returns device log for the specified test report
<h3>Example:</h3>
<code>api.readDeviceLog(testReportId)</code>
</td>
</tr>
<tr>
<td>
<b>GET</b> <code>/v2/logs/{testReportId}/vitals</code><br>
Returns device vitals of a test session after completion
<h3>Example:</h3>
<code>api.readVitalsLog(testReportId)</code>
</td>
</tr>
<tr>
<td>
<b>GET</b> <code>/v2/logs/{testReportId}/xcuitest</code><br>
Returns XCUITest log for the specified test report
<h3>Example:</h3>
<code>api.readXcuiTestLog(testReportId)</code>
</td>
</tr>
<tr>
<td>
<b>GET</b> <code>/v2/reports/{testReportId}</code><br>
Returns test report and artifacts for a test session after completion
<h3>Example:</h3>
<code>api.readReport(testReportId)</code>
</td>
</tr>
<tr>
<td>
<b>GET</b> <code>/v2/screenshots/{testReportId}/{screenshotId}.png</code><br>
Returns a PNG screenshot from a test
<h3>Example:</h3>
<code>api.getScreenshot(testReportId, screenshotId)</code>
</td>
</tr>
<tr>
<td>
<b>GET</b> <code>/v2/video/{videoId}.mp4</code><br>
Returns screen recording of a test session after completion
<h3>Example:</h3>
<code>api.getScreenRecording(videoId, { ...options })</code>
<br><h4>Options</h4>
<ul> <li><b>Range</b>: No description available.</li> </ul> </td>
</tr>
<tr>
<td>
<b>GET</b> <code>/metrics/</code><br>
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
collectCoverage: true,
coverageThreshold: {
global: {
branches: 94,
branches: 93.5,
functions: 98,
lines: 97,
statements: 97,
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "saucelabs",
"version": "7.5.0",
"version": "8.0.0",
"author": "Sauce Labs, Inc.",
"description": "A wrapper around Sauce Labs REST API",
"homepage": "https://github.com/saucelabs/node-saucelabs",
Expand Down
1 change: 0 additions & 1 deletion src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export const SAUCE_VERSION_NOTE = `node-saucelabs v${version}\nSauce Connect v${

const protocols = [
require('../apis/sauce.json'),
require('../apis/rdc.json'),
require('../apis/performance.json'),
require('../apis/testcomposer.json'),
require('../apis/datastore.json'),
Expand Down
7 changes: 0 additions & 7 deletions tests/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`should contain custom headers 1`] = `
{
"Authorization": "Basic Zm9vOmJhcg==",
"user-agent": "foo",
}
`;

exports[`should get builds failed jobs 1`] = `
[
[
Expand Down
Loading

0 comments on commit 9296e95

Please sign in to comment.