Calculator: Currency converter UI tests don't pass on production calculator

Created on 18 Nov 2020  路  9Comments  路  Source: microsoft/calculator

The UI tests for currency converter added in #1412 are failing in our (internal) release pipeline.

The tests assume that the selected source and destination currency are the same. This is true in the dev builds, when fake currency data is used, but it's not true in production builds.

The tests should be updated to explicitly select a currency before exercising the number pad.

Test Case Bug 1 fixed triage approved

All 9 comments

This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it.

I've written a helper to switch currency unit in #1432 :
https://github.com/microsoft/calculator/pull/1432/commits/bd8aab33847425f4dcfd0d76ce310c918729b2fd
However, I reverted this commit because I found Dev CI has no real currency data and I cannot pass the CI.

Is it possible to have real currency list with fake rates in Dev CI? Or at least add some currencies that are commonly used or have different format requirements, such as USD/CNY/JPY/KRW/JOD/...
In addition, it'd better if the tests could know whether they are run in Dev CI or internal Release CI.

The mock data is here and here. It uses fictional currencies so no one uses the fake rates by mistake, but maybe we could reconsider that to some extent. @joseartrivera, thoughts?

The tests can have different behavior in dev/release by configuring behavior using the .runsettings files in the repo, following the pattern established in #567.

Matt is correct that the mock data is fake so that nobody mistakes them for real rates, I think we could safely change one of the country codes to JPY and keep the rest as a mock to help cover this test case. @xuhongxu96 would this be sufficient?

Seems sufficient to test the fraction digits of the formatter.

Maybe 2 real currencies with different fraction digit formats such as JPY and JOD would be better to cover more cases. E.g. we can test if the formatter and UI is updated correctly after changing the currency in combobox/switching active.

Seems sufficient to test the fraction digits of the formatter.

Maybe 2 real currencies with different fraction digit formats such as JPY and JOD would be better to cover more cases. E.g. we can test if the formatter and UI is updated correctly after changing the currency in combobox/switching active.

Done!

Confirmed that UI Tests in Release CI have been fixed. But there is another step blocking the CI.

Marking this one as fixed since the Release CI issue is an unrelated problem (which I think will go away on the next build).

Was this page helpful?
0 / 5 - 0 ratings