(Refactor) : Converted Selenium test for CanUseRoleManager and Others to playwright (#6996)

* refactor: resovled merge conflict

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* (Refactor): Removed Selenium Test for CanUseRoleManager

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* Refactor : removed spacing and extra alert message

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* (Test):Converted/Added Playwright Test for CanSigninWithLoginCode

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* (Refactor): Removed Selenium Test for CanSigninWithLoginCode

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* fix: updated UIServerController.Roles.cs to handle storeID

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* refactor : updated some minor nits

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* Fix: Preserve store context when deleting server-wide roles from store page

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* refactor: fix auth mismatch in role Edit/Remove links for store context

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

---------

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
This commit is contained in:
Abhijay Jain
2025-11-27 15:17:32 +05:30
committed by GitHub
parent ab6aa1e920
commit 65dc0a761d
4 changed files with 235 additions and 201 deletions

View File

@@ -122,7 +122,11 @@ public partial class UIStoresController
[FromServices] StoreRepository storeRepository,
string role)
{
var roleData = await storeRepository.GetStoreRole(new StoreRoleId(storeId, role), true);
var roleId = await storeRepository.ResolveStoreRoleId(storeId, role);
if (roleId == null)
return NotFound();
var roleData = await storeRepository.GetStoreRole(roleId, true);
if (roleData == null)
return NotFound();
@@ -142,7 +146,10 @@ public partial class UIStoresController
[FromServices] StoreRepository storeRepository,
string role)
{
var roleId = new StoreRoleId(storeId, role);
var roleId = await storeRepository.ResolveStoreRoleId(storeId, role);
if (roleId == null)
return NotFound();
var roleData = await storeRepository.GetStoreRole(roleId, true);
if (roleData == null)
return NotFound();