Skip to content
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

Add tests of entity conflict summary table #923

Open
matthew-white opened this issue Dec 19, 2023 · 1 comment
Open

Add tests of entity conflict summary table #923

matthew-white opened this issue Dec 19, 2023 · 1 comment
Assignees
Labels
entities Multiple Encounter workflows testing Integration tests, unit tests

Comments

@matthew-white
Copy link
Member

The entity conflict summary table was added in #894. However, that PR included a limited number of tests. This issue is to add more tests of the table. The following comment lists cases to include in those tests: getodk/central#529 (comment)

@matthew-white matthew-white added testing Integration tests, unit tests entities Multiple Encounter workflows labels Dec 19, 2023
@matthew-white matthew-white self-assigned this Dec 19, 2023
@matthew-white
Copy link
Member Author

Here's one piece of code that I'm pretty sure isn't working right now:

// Check for properties that are in allReceived but not dataset.properties.
const expectedCount = allReceived.has('label')
? allReceived.size - 1
: allReceived.size;
if (result.length !== expectedCount) {
const propertySet = new Set(dataset.properties);
for (const name of allReceived) {
if (name !== 'label' && !propertySet.has(name)) result.push(name);
}
}

Specifically, dataset.properties is an array of objects, not an array of names, so line 147 should probably be something like:

const propertySet = new Set(dataset.properties.map(({ name }) => name));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
entities Multiple Encounter workflows testing Integration tests, unit tests
Projects
Status: 🕒 backlog
Development

No branches or pull requests

1 participant