-
Notifications
You must be signed in to change notification settings - Fork 17
Fix V2 Metadata tests #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix V2 Metadata tests #167
Conversation
…vy/FDC3-conformance-framework into fix-v2-metadata-tests
…C3-conformance-framework into fix-v2-metadata-tests
…vy/FDC3-conformance-framework into fix-v2-metadata-tests
@Joe-Dunleavy probably worth merging the release candidate branch into this one. If the diff doesn't clean up, close and recreate the PR using same branch and it should then. WIll be a lot easier to review once done |
@kriswest This branch has already been merged with the release candidate. There shouldn't be any merge conflicts. Any changes here that aren't related to metadata tests are refactoring/cleaning up the import statements. There is one other change to the open-b mock app which was added to close the mock app window (see pic). The test requires that no communication take place between the mock app and the test using the fdc3 API to close the mock app window. I've removed this for now, as it didn't really solve the problem. We would be better off using localStorage instead to communicate to the mock app that it should run I'll put in a separate issue for this. For now, leaving the mock app window open won't cause any problems because this is the only test that uses the open-b mock app. |
}); | ||
|
||
const AOpensBMalformedContext = `(AOpensBMalformedContext) App B listeners receive nothing when passing a malformed context`; | ||
it(AOpensBMalformedContext, async () => { | ||
const receiver = control.contextReceiver("context-received", true); | ||
await control.openMockApp(openApp.f.name, undefined, undefined, true, true); | ||
await receiver; | ||
await closeMockAppWindow(AOpensBMalformedContext); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be closeMockAppWindow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment above
@@ -26,15 +25,15 @@ export default () => | |||
const result = control.contextReceiver("fdc3-conformance-opened"); | |||
await control.openMockApp(openApp.b.name); | |||
await result; | |||
await closeMockAppWindow(AOpensB2Test); | |||
await control.closeMockApp(AOpensB2Test); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the control.closeMockApp and just use closeMockAppWindow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember now why I'm calling the closeMockApp function via the interface implementation instead of directly from the utils folder. It's because the common tests require the function to be called from the 1.2 utils file or the 2.0 utils file depending on whether 1.2 or 2.0 tests are being run.
using the interface, the tests need to be able to freely switch between the two versions of the function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well worth adding a comment then (Future-Joe will thank you!)
can we merge this then? |
This fixes the v2 metadata tests.
New bugs had come to light after testing this against Finsemble's FDC3 2.0 implementation.
This PR should only be merged after the v2 intent tests PR has been merged in.