getByAltText RTL query do not working with ion-img


I am trying to get the alt text for an img in my tests. It is not found. The getByAltText only works for the tag img. It seems that it does not work for ion-img.

Is there any way to make it work?

  test(`should have an alt for img with text as 'Collections not found'`, () => {
    const { getByAltText } = render(<CollectionNotFound />);
    getByAltText("Collections not found");

Unable to find an element with the alt text: Collections not found.

    alt="Collections not found"
    class="sc-bdfBwQ ckSWCD"

React Test Library query reference: