Skip to content

Conversation

@sreecharan-desu
Copy link
Contributor

Because

The ConnectedServices tests started failing after recent changes, as they were still using the old groupedByName field.

This pull request

  • Removes the outdated groupedByName usage
  • Updates the tests to match the current return type
  • Fixes the TypeScript build errors

Issue that this pull request solves

Closes: #17370

Checklist

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.

@sreecharan-desu
Copy link
Contributor Author

Note: This supersedes the earlier PR (#19931), which I accidentally closed while resolving the signing and build issues.

@MagentaManifold
Copy link
Contributor

I'm sorry, but this PR doesn't contain your earlier changes to the files, only updated tests. The updated test is also nonsensical.

sortAndFilterConnectedClients(MOCK_SERVICES);
const { sortedAndUniqueClients } = sortAndFilterConnectedClients(MOCK_SERVICES);

const monitorClients = MOCK_SERVICES.filter(
Copy link
Contributor

Choose a reason for hiding this comment

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

There's no point in doing this. It was to test groupByName's value, not the number of Monitor clients. If you remove groupByName you should remove this part of the test as well, and update it to test what you've added.

@sreecharan-desu
Copy link
Contributor Author

Thanks for pointing this out - you’re right.

It looks like the implementation commits were dropped while I was resolving the earlier signing/build issues, and only the test updates made it into this PR.

I’ll restore the original changes and update this PR accordingly.

Appreciate your patience.

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.

Devices sharing same name are displayed as a single device on connected services

2 participants