8000 Fix V2 Metadata tests by Joe-Dunleavy · Pull Request #167 · finos/FDC3-conformance-framework · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged

Conversation

Joe-Dunleavy
Copy link
Contributor

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.

@kriswest
Copy link
Contributor

@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

@Joe-Dunleavy
Copy link
Contributor Author

@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 window.close once the test has completed.

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.

image

});

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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be closeMockAppWindow?

Copy link
Contributor Author

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);
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Contributor

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!)

@robmoffat
Copy link
Member

can we merge this then?

@Joe-Dunleavy Joe-Dunleavy merged commit 3dc059e into finos:2.0-release-candidate-2 Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0