Skip to content

Commit

Permalink
snapshot diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
gnarf committed Mar 22, 2024
1 parent 94ee15b commit 8b00f61
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 26 deletions.
36 changes: 18 additions & 18 deletions src/host/tests/snapshots/agent.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Generated by [AVA](https://avajs.dev).
},
]

> {"tests":[],"options":{"config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: log
> {"tests":[],"options":{"config":{"referenceBaseUrl":{"protocol":"http:","hostname":"localhost","port":1234,"pathname":"/path"}}}}: log
[
{
Expand Down Expand Up @@ -210,7 +210,7 @@ Generated by [AVA](https://avajs.dev).
},
]

> {"tests":[],"options":{"protocol":"fork","config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: log
> {"tests":[],"options":{"protocol":"fork","config":{"referenceBaseUrl":{"protocol":"http:","hostname":"localhost","port":1234,"pathname":"/path"}}}}: log
[
{
Expand Down Expand Up @@ -278,7 +278,7 @@ Generated by [AVA](https://avajs.dev).
},
]

> {"tests":[],"options":{"protocol":"developer","config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: log
> {"tests":[],"options":{"protocol":"developer","config":{"referenceBaseUrl":{"protocol":"http:","hostname":"localhost","port":1234,"pathname":"/path"}}}}: log
[
{
Expand Down Expand Up @@ -479,7 +479,7 @@ Generated by [AVA](https://avajs.dev).
},
]

> {"tests":[1],"options":{"config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 1)
> {"tests":[1],"options":{"config":{"referenceBaseUrl":{"protocol":"http:","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 1)
{
capabilities: {
Expand All @@ -506,7 +506,7 @@ Generated by [AVA](https://avajs.dev).
testId: 1,
}

> {"tests":[1],"options":{"config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: log
> {"tests":[1],"options":{"config":{"referenceBaseUrl":{"protocol":"http:","hostname":"localhost","port":1234,"pathname":"/path"}}}}: log
[
{
Expand Down Expand Up @@ -738,7 +738,7 @@ Generated by [AVA](https://avajs.dev).
},
]

> {"tests":[1],"options":{"protocol":"fork","config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 1)
> {"tests":[1],"options":{"protocol":"fork","config":{"referenceBaseUrl":{"protocol":"http:","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 1)
{
capabilities: {
Expand All @@ -765,7 +765,7 @@ Generated by [AVA](https://avajs.dev).
testId: 1,
}

> {"tests":[1],"options":{"protocol":"fork","config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: log
> {"tests":[1],"options":{"protocol":"fork","config":{"referenceBaseUrl":{"protocol":"http:","hostname":"localhost","port":1234,"pathname":"/path"}}}}: log
[
{
Expand Down Expand Up @@ -958,7 +958,7 @@ Generated by [AVA](https://avajs.dev).
},
]

> {"tests":[1],"options":{"protocol":"developer","config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 1)
> {"tests":[1],"options":{"protocol":"developer","config":{"referenceBaseUrl":{"protocol":"http:","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 1)
{
capabilities: {
Expand All @@ -985,7 +985,7 @@ Generated by [AVA](https://avajs.dev).
testId: 1,
}

> {"tests":[1],"options":{"protocol":"developer","config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: log
> {"tests":[1],"options":{"protocol":"developer","config":{"referenceBaseUrl":{"protocol":"http:","hostname":"localhost","port":1234,"pathname":"/path"}}}}: log
[
{
Expand Down Expand Up @@ -1300,7 +1300,7 @@ Generated by [AVA](https://avajs.dev).
},
]

> {"tests":[1,2],"options":{"config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 1)
> {"tests":[1,2],"options":{"config":{"referenceBaseUrl":{"protocol":"http:","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 1)
{
capabilities: {
Expand All @@ -1327,7 +1327,7 @@ Generated by [AVA](https://avajs.dev).
testId: 1,
}

> {"tests":[1,2],"options":{"config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 2)
> {"tests":[1,2],"options":{"config":{"referenceBaseUrl":{"protocol":"http:","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 2)
{
capabilities: {
Expand All @@ -1354,7 +1354,7 @@ Generated by [AVA](https://avajs.dev).
testId: 2,
}

> {"tests":[1,2],"options":{"config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: log
> {"tests":[1,2],"options":{"config":{"referenceBaseUrl":{"protocol":"http:","hostname":"localhost","port":1234,"pathname":"/path"}}}}: log
[
{
Expand Down Expand Up @@ -1700,7 +1700,7 @@ Generated by [AVA](https://avajs.dev).
},
]

> {"tests":[1,2],"options":{"protocol":"fork","config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 1)
> {"tests":[1,2],"options":{"protocol":"fork","config":{"referenceBaseUrl":{"protocol":"http:","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 1)
{
capabilities: {
Expand All @@ -1727,7 +1727,7 @@ Generated by [AVA](https://avajs.dev).
testId: 1,
}

> {"tests":[1,2],"options":{"protocol":"fork","config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 2)
> {"tests":[1,2],"options":{"protocol":"fork","config":{"referenceBaseUrl":{"protocol":"http:","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 2)
{
capabilities: {
Expand All @@ -1754,7 +1754,7 @@ Generated by [AVA](https://avajs.dev).
testId: 2,
}

> {"tests":[1,2],"options":{"protocol":"fork","config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: log
> {"tests":[1,2],"options":{"protocol":"fork","config":{"referenceBaseUrl":{"protocol":"http:","hostname":"localhost","port":1234,"pathname":"/path"}}}}: log
[
{
Expand Down Expand Up @@ -2072,7 +2072,7 @@ Generated by [AVA](https://avajs.dev).
},
]

> {"tests":[1,2],"options":{"protocol":"developer","config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 1)
> {"tests":[1,2],"options":{"protocol":"developer","config":{"referenceBaseUrl":{"protocol":"http:","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 1)
{
capabilities: {
Expand All @@ -2099,7 +2099,7 @@ Generated by [AVA](https://avajs.dev).
testId: 1,
}

> {"tests":[1,2],"options":{"protocol":"developer","config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 2)
> {"tests":[1,2],"options":{"protocol":"developer","config":{"referenceBaseUrl":{"protocol":"http:","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 2)
{
capabilities: {
Expand All @@ -2126,7 +2126,7 @@ Generated by [AVA](https://avajs.dev).
testId: 2,
}

> {"tests":[1,2],"options":{"protocol":"developer","config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: log
> {"tests":[1,2],"options":{"protocol":"developer","config":{"referenceBaseUrl":{"protocol":"http:","hostname":"localhost","port":1234,"pathname":"/path"}}}}: log
[
{
Expand Down
Binary file modified src/host/tests/snapshots/agent.js.snap
Binary file not shown.
50 changes: 42 additions & 8 deletions src/host/tests/snapshots/cli-run-plan.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,22 @@ Generated by [AVA](https://avajs.dev).
`,
stdout: `Callback Fetch Mocked: http://callback.url/ {␊
method: 'post',␊
body: '{"testCsvRow":1,"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"responses":["mocked output for UP_ARROW"],"atVersionName":"1.0","browserVersionName":"1.0"}',␊
body: '{"status":"TEST_STARTED"}',␊
headers: { 'Content-Type': 'application/json', test: 'header:multiple:colon' }␊
}␊
Callback Fetch Mocked: http://callback.url/ {␊
method: 'post',␊
body: '{"testCsvRow":2,"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"responses":["mocked output for UP_ARROW,DOWN_ARROW"],"atVersionName":"1.0","browserVersionName":"1.0"}',␊
body: '{"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"responses":["mocked output for UP_ARROW"]}',␊
headers: { 'Content-Type': 'application/json', test: 'header:multiple:colon' }␊
}␊
Callback Fetch Mocked: http://callback.url/ {␊
method: 'post',␊
body: '{"status":"TEST_STARTED"}',␊
headers: { 'Content-Type': 'application/json', test: 'header:multiple:colon' }␊
}␊
Callback Fetch Mocked: http://callback.url/ {␊
method: 'post',␊
body: '{"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"responses":["mocked output for UP_ARROW,DOWN_ARROW"]}',␊
headers: { 'Content-Type': 'application/json', test: 'header:multiple:colon' }␊
}␊
{"name":"unknown","tests":[{"filepath":"tests/test-1.json","log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."}],"results":[{"testId":1,"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"commands":[{"command":"UP_ARROW","output":"mocked output for UP_ARROW"}],"results":[{"command":"UP_ARROW","expectation":"role up","pass":true,"output":"mocked output for role up"}]}]},{"filepath":"tests/test-2.json","log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."}],"results":[{"testId":2,"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"commands":[{"command":"UP_ARROW,DOWN_ARROW","output":"mocked output for UP_ARROW,DOWN_ARROW"}],"results":[{"command":"UP_ARROW,DOWN_ARROW","expectation":"role down","pass":true,"output":"mocked output for role down"}]}]}],"log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."},{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."}]}␊
Expand All @@ -139,27 +149,39 @@ Generated by [AVA](https://avajs.dev).
[Agent]: Starting...␊
Agent running with protocol 'fork'.␊
Starting test.␊
HTTP 418 response received when reporting result: 'a body'.␊
[Server]: Serving '/static/reference/index.html'.␊
[Agent]: Open page: 'http://localhost:8888/static/reference/index.html'.␊
HTTP 418 response received when reporting result: 'a body'.␊
Starting test.␊
HTTP 418 response received when reporting result: 'a body'.␊
HTTP 418 response received when reporting result: 'a body'.␊
[Server]: Serving '/static/reference/index.html'.␊
[Agent]: Open page: 'http://localhost:8888/static/reference/index.html'.␊
HTTP 418 response received when reporting result: 'a body'.␊
Removing reference from 'http://localhost:8888/static␊
Stopping test agent.␊
HTTP 418 response received when reporting result: 'a body'.␊
[Agent]: Stopping...␊
Stopping reference server.␊
Stopping...␊
`,
stdout: `Callback Fetch Mocked: http://example.com/?TEST-STATUS=418 {␊
method: 'post',␊
body: '{"testCsvRow":1,"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"responses":["mocked output for UP_ARROW"],"atVersionName":"1.0","browserVersionName":"1.0"}',␊
body: '{"status":"TEST_STARTED"}',␊
headers: { 'Content-Type': 'application/json', x: 'y' }␊
}␊
Callback Fetch Mocked: http://example.com/?TEST-STATUS=418 {␊
method: 'post',␊
body: '{"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"responses":["mocked output for UP_ARROW"]}',␊
headers: { 'Content-Type': 'application/json', x: 'y' }␊
}␊
Callback Fetch Mocked: http://example.com/?TEST-STATUS=418 {␊
method: 'post',␊
body: '{"status":"TEST_STARTED"}',␊
headers: { 'Content-Type': 'application/json', x: 'y' }␊
}␊
Callback Fetch Mocked: http://example.com/?TEST-STATUS=418 {␊
method: 'post',␊
body: '{"testCsvRow":2,"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"responses":["mocked output for UP_ARROW,DOWN_ARROW"],"atVersionName":"1.0","browserVersionName":"1.0"}',␊
body: '{"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"responses":["mocked output for UP_ARROW,DOWN_ARROW"]}',␊
headers: { 'Content-Type': 'application/json', x: 'y' }␊
}␊
{"name":"unknown","tests":[{"filepath":"tests/test-1.json","log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."}],"results":[{"testId":1,"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"commands":[{"command":"UP_ARROW","output":"mocked output for UP_ARROW"}],"results":[{"command":"UP_ARROW","expectation":"role up","pass":true,"output":"mocked output for role up"}]}]},{"filepath":"tests/test-2.json","log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."}],"results":[{"testId":2,"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"commands":[{"command":"UP_ARROW,DOWN_ARROW","output":"mocked output for UP_ARROW,DOWN_ARROW"}],"results":[{"command":"UP_ARROW,DOWN_ARROW","expectation":"role down","pass":true,"output":"mocked output for role down"}]}]}],"log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."},{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."}]}␊
Expand All @@ -179,10 +201,12 @@ Generated by [AVA](https://avajs.dev).
[Agent]: Starting...␊
Agent running with protocol 'fork'.␊
Starting test.␊
HTTP 418 response received when reporting result: 'Unknown error - unable to read response body.'.␊
[Server]: Serving '/static/reference/index.html'.␊
[Agent]: Open page: 'http://localhost:8888/static/reference/index.html'.␊
HTTP 418 response received when reporting result: 'Unknown error - unable to read response body.'.␊
Starting test.␊
HTTP 418 response received when reporting result: 'Unknown error - unable to read response body.'.␊
[Server]: Serving '/static/reference/index.html'.␊
[Agent]: Open page: 'http://localhost:8888/static/reference/index.html'.␊
HTTP 418 response received when reporting result: 'Unknown error - unable to read response body.'.␊
Expand All @@ -194,12 +218,22 @@ Generated by [AVA](https://avajs.dev).
`,
stdout: `Callback Fetch Mocked: http://example.com/?TEST-STATUS=418&TEST-BAD-BODY {␊
method: 'post',␊
body: '{"testCsvRow":1,"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"responses":["mocked output for UP_ARROW"],"atVersionName":"1.0","browserVersionName":"1.0"}',␊
body: '{"status":"TEST_STARTED"}',␊
headers: { 'Content-Type': 'application/json', x: 'y' }␊
}␊
Callback Fetch Mocked: http://example.com/?TEST-STATUS=418&TEST-BAD-BODY {␊
method: 'post',␊
body: '{"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"responses":["mocked output for UP_ARROW"]}',␊
headers: { 'Content-Type': 'application/json', x: 'y' }␊
}␊
Callback Fetch Mocked: http://example.com/?TEST-STATUS=418&TEST-BAD-BODY {␊
method: 'post',␊
body: '{"status":"TEST_STARTED"}',␊
headers: { 'Content-Type': 'application/json', x: 'y' }␊
}␊
Callback Fetch Mocked: http://example.com/?TEST-STATUS=418&TEST-BAD-BODY {␊
method: 'post',␊
body: '{"testCsvRow":2,"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"responses":["mocked output for UP_ARROW,DOWN_ARROW"],"atVersionName":"1.0","browserVersionName":"1.0"}',␊
body: '{"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"responses":["mocked output for UP_ARROW,DOWN_ARROW"]}',␊
headers: { 'Content-Type': 'application/json', x: 'y' }␊
}␊
{"name":"unknown","tests":[{"filepath":"tests/test-1.json","log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."}],"results":[{"testId":1,"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"commands":[{"command":"UP_ARROW","output":"mocked output for UP_ARROW"}],"results":[{"command":"UP_ARROW","expectation":"role up","pass":true,"output":"mocked output for role up"}]}]},{"filepath":"tests/test-2.json","log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."}],"results":[{"testId":2,"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"commands":[{"command":"UP_ARROW,DOWN_ARROW","output":"mocked output for UP_ARROW,DOWN_ARROW"}],"results":[{"command":"UP_ARROW,DOWN_ARROW","expectation":"role down","pass":true,"output":"mocked output for role down"}]}]}],"log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."},{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."}]}␊
Expand Down
Binary file modified src/host/tests/snapshots/cli-run-plan.js.snap
Binary file not shown.

0 comments on commit 8b00f61

Please sign in to comment.