User role is different in published and preview mode

I have some features which are allowed only to admin :

if (currentUser.loggedIn && ( currentUser.role === ‘Admin’))
{
$w(‘#adminBox’).show();
}

This works fine on published site, after login with my user which assigned admin role, however when previewing the site i am not able to test that functionality because default user role is: Member and no option to perform login and became an Admin.

How i can workaround this issue? Like to check in wix code that if its a preview, then show adminBox anyway…

As noted in the wix-users API:
The APIs in wix-users are only partially functional when previewing your site. View a published version of your site to see their complete functionality.

However, its seems i can independently query built in Members table to check if current user is my Admin to allow adminBox in editing mode , right?