testdriverai 4.1.40 → 4.1.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12,10 +12,23 @@ jobs:
|
|
|
12
12
|
name: Trigger testdriver-dev
|
|
13
13
|
runs-on: ubuntu-latest
|
|
14
14
|
steps:
|
|
15
|
+
- name: Extract short SHA
|
|
16
|
+
run: |
|
|
17
|
+
SHORT_SHA=$(echo "${{ github.event.pull_request.head.sha }}" | cut -c1-7)
|
|
18
|
+
echo "SHORT_SHA=$SHORT_SHA" >> $GITHUB_ENV
|
|
19
|
+
|
|
15
20
|
- name: Trigger workflow in Testdriver Dev
|
|
16
21
|
uses: peter-evans/repository-dispatch@v2
|
|
17
22
|
with:
|
|
18
23
|
token: ${{ secrets.TESTDRIVER_DEV_TOKEN }}
|
|
19
24
|
repository: testdriverai/testdriver-dev
|
|
20
25
|
event-type: trigger-from-client
|
|
21
|
-
client-payload:
|
|
26
|
+
client-payload: >-
|
|
27
|
+
{
|
|
28
|
+
"pr_number": "${{ github.event.pull_request.number }}",
|
|
29
|
+
"pr_sha": "${{ github.event.pull_request.head.sha }}",
|
|
30
|
+
"api_ref": "${{ env.API_REF }}",
|
|
31
|
+
"repo_name": "${{ github.repository }}",
|
|
32
|
+
"branch_name": "${{ github.event.pull_request.head.ref }}",
|
|
33
|
+
"pr_short_sha": "${{ env.SHORT_SHA }}"
|
|
34
|
+
}
|
package/lib/redraw.js
CHANGED
|
@@ -120,12 +120,12 @@ let startImage = null;
|
|
|
120
120
|
|
|
121
121
|
async function start() {
|
|
122
122
|
resetState();
|
|
123
|
-
startImage = await captureScreenPNG(
|
|
123
|
+
startImage = await captureScreenPNG(0.25, true);
|
|
124
124
|
return startImage;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
async function checkCondition(resolve, startTime, timeoutMs) {
|
|
128
|
-
let nowImage = await captureScreenPNG(.
|
|
128
|
+
let nowImage = await captureScreenPNG(.25, true);
|
|
129
129
|
let timeElapsed = Date.now() - startTime;
|
|
130
130
|
let diffPercent = 0;
|
|
131
131
|
let isTimeout = timeElapsed > timeoutMs;
|