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

Re-evaluate Episode test #2789

Open
lindboe opened this issue Sep 27, 2024 · 0 comments
Open

Re-evaluate Episode test #2789

lindboe opened this issue Sep 27, 2024 · 0 comments

Comments

@lindboe
Copy link
Contributor

lindboe commented Sep 27, 2024

On some prior changes to make react-i18next work, what the Episode.test.ts test returned changed: https://github.com/infinitered/ignite/pull/2788/files#diff-4cc30eb5073b136225c5e125f89e9633099446e21bf96af2bc878a128c56878cR30. The reason why is not yet clear.

However, the translation is done correctly in the running app, but it doesn't affect the app anyways, because these accessibility labels are never actually read out (see #2730). (When inspecting the value in the models via debugging, I verified it translate them correctly after the linked change to react-i18next):

// DemoPodcastListScreen.tsx

const EpisodeCard = ...
 ...
  console.log("EPISODE DATA", episode.duration)

  return (
    <Card
      style={themed($item)}
      verticalAlignment="force-footer-bottom"
 ...

// prints
 LOG  EPISODE DATA {"accessibilityLabel": "Duration: 0 hours 44 minutes 55 seconds", "textLabel": "44:55"}
 LOG  EPISODE DATA {"accessibilityLabel": "Duration: 1 hours 2 minutes 30 seconds", "textLabel": "1:2:30"}
 LOG  EPISODE DATA {"accessibilityLabel": "Duration: 0 hours 25 minutes 7 seconds", "textLabel": "25:7"}

Therefore, this test doesn't appear to be very useful. It's not asserting that the label is shown in the UI nor that we can actually translate correctly. It did, at least, previously assert that the data was being passed to the translate call, but apparently that data still is being passed in during an actual app run, which implies that our test may not match our application.

Determine what we should be testing and write tests that more accurately verify the behavior of the application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant