Closed r100-stack closed 1 year ago
I think that the test for combobox loading state is unecessary if they end up just looking loaded
I think it would be safer to ignore the <img>
there too. Because if for some reason the <img>
doesn't load later, the test would fail.
Actually, the test failure mentioned in the PR description might have been because the baseline image was "without" loading the <img>
but the test image on GitHub was "with" loading with the <img>
.
Thus, I feel it is safer to ignore all <img>
s with urls as their src
.
I think it would be safer to ignore the
there too. Because if for some reason the
doesn't load later, the test would fail.
Actually, the test failure mentioned in the PR description might have been because the baseline image was "without" loading the
but the test image on GitHub was "with" loading with the
.
Thus, I feel it is safer to ignore all
s with urls as their src.
I meant more like - don't add the test if it doesn't add value.
Other than that, it looks good.
I approved it; don't know if we should wait for an approval from someone else
Issue
I was on the iTwinUI-react GitHub page and saw that the CI is failing.![image](https://user-images.githubusercontent.com/45748283/206794088-ce89dd30-81e6-4c86-8fd7-54e8004590ad.png)
I think it is from the latest merged PR #974 in which the Avatar test is failing in this CI action.![image](https://user-images.githubusercontent.com/45748283/206794111-287fad94-5f1d-402b-bed6-9ba2c48562b2.png)
Fix
Avatar's WithImage story is an Avatar with an
with an src that needs to download the image.
![image](https://user-images.githubusercontent.com/45748283/206793812-4b3dd9cf-fea4-49eb-bdfd-7ce61b4c86ab.png)
The baseline image so far was actually an empty circle:![image](https://user-images.githubusercontent.com/45748283/206793831-4ca6f06a-06e6-4f4d-a68c-a05f63fc60c8.png)
NEW METHOD
Instead of
cy.wait(2000)
, I am now usinghide()
to hide the<img>
tags in all stories with<img>
. I got this idea from Tile.test.ts L25-31. I used more specific selectors whenever possible (e.g.img.iui-icon
) and otherwise used a normalimg
selector.I also applied this fix for all stories with
<img>
.This is a quick PR with this small fix so that CI does not fail. Hopefully we can merge it soon. Later if there is a better fix, we can do that.
Checklist