Skip to content

Commit

Permalink
fixes to several tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kriswest committed Oct 17, 2024
1 parent a769e4a commit e9ad15a
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/fdc3-agent-proxy/test/features/heartbeat.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Feature: Heartbeats
When messaging receives a heartbeat event
And messaging will have posts
| matches_type |
| heartbeatAcknowledgement |
| heartbeatAcknowledgementRequest |

Scenario: Saying Goodbye
When I call "{api}" with "disconnect"
Expand Down
2 changes: 1 addition & 1 deletion packages/fdc3-agent-proxy/test/support/TestMessaging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class TestMessaging extends AbstractMessaging {

constructor(channelState: { [key: string]: Context[] }) {
super({
timeout: 0,
timeoutMs: 0,
channelSelector: false,
intentResolver: false,
dontSetWindowFdc3: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Given('a browser document in {string} and window in {string}', async function (t

Given("the session identity is set to {string}", async function (this: CustomWorld, id: string) {
const details: DesktopAgentDetails = {
agentType: WebDesktopAgentType.PROXY_PARENT,
agentType: WebDesktopAgentType.ProxyParent,
instanceUuid: handleResolve(id, this),
appId: 'cucumber-app',
instanceId: 'uuid-0'
Expand Down
2 changes: 1 addition & 1 deletion packages/fdc3-standard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"scripts": {
"clean": "rimraf dist",
"build": "tsc --module es2022",
"test": "tsc; jest --verbose",
"test": "tsc && jest",
"lint": "eslint src/ --fix"
},
"prettier": {
Expand Down
2 changes: 1 addition & 1 deletion toolbox/fdc3-for-web/fdc3-web-impl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"scripts": {
"clean": "rimraf dist && rimraf cucumber-report.html && rimraf coverage && rimraf .nyc_output && rimraf node_modules",
"directory-openapi": "npx openapi-typescript ../../../packages/fdc3-standard/src/app-directory/specification/appd.schema.json --output generated/directory-schema.ts",
"test": "npm run directory-openapi; tsc; nyc --reporter=lcov --reporter=text cucumber-js",
"test": "npm run directory-openapi && tsc && nyc --reporter=lcov --reporter=text cucumber-js",
"build": "npm run directory-openapi && tsc --module es2022"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ Feature: Heartbeat Messages Between Apps and Server
When "libraryApp/a1" is opened with connection id "a1"
And "a1" sends validate
And we wait for a period of "500" ms
And "libraryApp/a1" sends a heartbeat response
And "libraryApp/a1" sends a heartbeat response to eventUuid "a1_1"
And we wait for a period of "500" ms
And "libraryApp/a1" sends a heartbeat response
And "libraryApp/a1" sends a heartbeat response to eventUuid "a1_2"
And we wait for a period of "500" ms
And "libraryApp/a1" sends a heartbeat response
And "libraryApp/a1" sends a heartbeat response to eventUuid "a1_3"
And we wait for a period of "500" ms
And "libraryApp/a1" sends a heartbeat response
And "libraryApp/a1" sends a heartbeat response to eventUuid "a1_4"
And we wait for a period of "500" ms
And "libraryApp/a1" sends a heartbeat response
And "libraryApp/a1" sends a heartbeat response to eventUuid "a1_5"
And we wait for a period of "500" ms
Then I test the liveness of "libraryApp/a1"
Then "{result}" is true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { CustomWorld } from "../world";
import { HeartbeatAcknowledgementRequest } from "@kite9/fdc3-schema/generated/api/BrowserTypes";
import { createMeta } from "./generic.steps";

Given('{string} sends a heartbeat response', function (this: CustomWorld, appStr: string) {
Given('{string} sends a heartbeat response to eventUuid {string}', function (this: CustomWorld, appStr: string, eventUuid: string) {
const meta = createMeta(this, appStr)
const uuid = this.sc.getInstanceUUID(meta.source)!!

const message = {
meta,
payload: {
timestamp: new Date()
heartbeatEventUuid: eventUuid
},
type: 'heartbeatAcknowledgementRequest'
} as HeartbeatAcknowledgementRequest
Expand Down

0 comments on commit e9ad15a

Please sign in to comment.