You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature-request : add availability to pass test ID's to Didomi notice UI elements #116
I would like to ask if it could be possible to add a new parameter to add the availability to pass test ID's on the UI elements of the Didomi notice.
Context
Currently, I am working on a react-native project which uses Didomi as consent management solution.
We have an OnBoarding process where we display the Didomi consent notice (with the Didomi.setupUI() function) and the user can accept or deny the cookies.
I am now working on the implementation of E2E tests (with detox), and my team would like to make a complete test case scenario for the OnBoarding process
Current researches
From what I looked in the documentation, there is no way to pass testID's to any part of the notice UI generated by the Didomi.setupUI.
I have looked all the other functions documentation, but it doesn't seem to exist.
iOS
For iOS, I managed to extract some native ID's using the XCode Layout Inspector and by using them in my E2E test, I was able to target and validate the existence of the UI element (both for accepting and rejecting the cookies)👍
// Part of Detox E2E testawaitexpect(element(by.id('notice_agree_button'))).toBeVisible();awaitelement(by.id('notice_agree_button')).tap();
But these are ID's on which I have no control 🙁 if in a new update of this package, there is a change, I would have to start again
Android
Here is the limitation, even when using the Android Studio Layout Inspector, I was not able to find any ID that could work with my E2E test.
I could only find the native ID of the button (ex: @id/button_notice_header_disagree_link) but detox is not able to target it as the by.id function is limited to ID's given by the testID prop of react-native
Current workaround
Currently, I am using the text of the button's, it works but it could be great if I could have control on the test ID's for iOS and Android 🙂
Feature request
Could it be possible to add some parameter for example on the setupUI function to pass some test ID's ? 🙂
We could have an object who could have a specific key for each UI element and give us the oppportunity to pass them when running Didomi.setupUI
Activity
felipe-saez commentedon May 28, 2024
Hello Viktor,
Thank you for your detailed explanation and suggestion regarding the enhancement of the setupUI function.
I will pass your request along to our product team for review. They will evaluate the feasibility of this feature.
We'll keep you updated on any developments related to your request.
Best regards,
Felipe
Vikmanatus commentedon May 28, 2024
Hello Felipe,
Thank you for your quick response !
Thank you very much, if you have any further questions, don't hesitate to contact me !
Best regards,
Viktor