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
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
Hello to everyone,
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 processCurrent 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 theDidomi.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)👍
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
) butdetox
is not able to target it as theby.id
function is limited to ID's given by thetestID
prop ofreact-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
Example :
I would be more than happy to contribute to this package if needed and implement this feature 🙂
Thank you very much for reading this post
Best regards
The text was updated successfully, but these errors were encountered: