Skip to content

Commit bed3647

Browse files
Add ID attributes to all interactive elements for Playwright test selectors
Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
1 parent d20a254 commit bed3647

11 files changed

Lines changed: 16 additions & 16 deletions

File tree

EstateManagementUI.BlazorServer/Components/Layout/NavMenu.razor

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<nav class="px-2 space-y-2">
2-
<NavLink class="nav-menu-item group" href="" Match="NavLinkMatch.All">
2+
<NavLink id="dashboardLink" class="nav-menu-item group" href="" Match="NavLinkMatch.All">
33
<span class="nav-menu-icon">
44
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
55
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"></path>
@@ -8,7 +8,7 @@
88
<span class="nav-menu-text">Dashboard</span>
99
</NavLink>
1010

11-
<NavLink class="nav-menu-item group" href="estate">
11+
<NavLink id="estateDetailsLink" class="nav-menu-item group" href="estate">
1212
<span class="nav-menu-icon">
1313
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
1414
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"></path>
@@ -17,7 +17,7 @@
1717
<span class="nav-menu-text">Estate Management</span>
1818
</NavLink>
1919

20-
<NavLink class="nav-menu-item group" href="merchants">
20+
<NavLink id="merchantsLink" class="nav-menu-item group" href="merchants">
2121
<span class="nav-menu-icon">
2222
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
2323
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z"></path>
@@ -26,7 +26,7 @@
2626
<span class="nav-menu-text">Merchant Management</span>
2727
</NavLink>
2828

29-
<NavLink class="nav-menu-item group" href="contracts">
29+
<NavLink id="contractsLink" class="nav-menu-item group" href="contracts">
3030
<span class="nav-menu-icon">
3131
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
3232
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
@@ -35,7 +35,7 @@
3535
<span class="nav-menu-text">Contract Management</span>
3636
</NavLink>
3737

38-
<NavLink class="nav-menu-item group" href="operators">
38+
<NavLink id="operatorsLink" class="nav-menu-item group" href="operators">
3939
<span class="nav-menu-icon">
4040
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
4141
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4"></path>
@@ -44,7 +44,7 @@
4444
<span class="nav-menu-text">Operator Management</span>
4545
</NavLink>
4646

47-
<NavLink class="nav-menu-item group" href="file-processing">
47+
<NavLink id="fileProcessingLink" class="nav-menu-item group" href="file-processing">
4848
<span class="nav-menu-icon">
4949
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
5050
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path>

EstateManagementUI.BlazorServer/Components/Pages/Contracts/Index.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<!-- Page Header -->
1010
<div class="flex items-center justify-between">
1111
<h1 class="text-2xl font-bold text-gray-900">Contract Management</h1>
12-
<button class="btn btn-primary" @onclick='() => NavigationManager.NavigateTo("/contracts/new")'>
12+
<button id="newContractButton" class="btn btn-primary" @onclick='() => NavigationManager.NavigateTo("/contracts/new")'>
1313
<svg class="w-5 h-5 inline-block mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
1414
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path>
1515
</svg>

EstateManagementUI.BlazorServer/Components/Pages/Contracts/New.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
<button type="button" class="btn btn-secondary" @onclick="Cancel" disabled="@isSaving">
7676
Cancel
7777
</button>
78-
<button type="submit" class="btn btn-primary" disabled="@isSaving">
78+
<button id="createContractButton" type="submit" class="btn btn-primary" disabled="@isSaving">
7979
@if (isSaving)
8080
{
8181
<span class="inline-block animate-spin rounded-full h-4 w-4 border-b-2 border-white mr-2"></span>

EstateManagementUI.BlazorServer/Components/Pages/EntryScreen.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
<!-- Sign In Section -->
132132
<div class="mt-12 text-center">
133133
<p class="text-gray-600 mb-4">Sign in to access all features</p>
134-
<a href="/login" class="inline-flex items-center px-8 py-3 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-lg shadow-md transition-colors duration-150">
134+
<a id="loginButton" href="/login" class="inline-flex items-center px-8 py-3 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-lg shadow-md transition-colors duration-150">
135135
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
136136
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1"></path>
137137
</svg>

EstateManagementUI.BlazorServer/Components/Pages/EstateInfo.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<div class="bg-gray-50 rounded-lg p-6 text-center">
4141
<p class="text-gray-700 mb-4">Sign in to access full estate management features</p>
4242
<div class="flex justify-center space-x-4">
43-
<a href="/login" class="inline-flex items-center px-6 py-3 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-lg shadow-md transition-colors duration-150">
43+
<a id="loginButton" href="/login" class="inline-flex items-center px-6 py-3 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-lg shadow-md transition-colors duration-150">
4444
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
4545
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1"></path>
4646
</svg>

EstateManagementUI.BlazorServer/Components/Pages/FileInfo.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<div class="bg-gray-50 rounded-lg p-6 text-center">
4141
<p class="text-gray-700 mb-4">Sign in to access full file processing features</p>
4242
<div class="flex justify-center space-x-4">
43-
<a href="/login" class="inline-flex items-center px-6 py-3 bg-teal-600 hover:bg-teal-700 text-white font-semibold rounded-lg shadow-md transition-colors duration-150">
43+
<a id="loginButton" href="/login" class="inline-flex items-center px-6 py-3 bg-teal-600 hover:bg-teal-700 text-white font-semibold rounded-lg shadow-md transition-colors duration-150">
4444
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
4545
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1"></path>
4646
</svg>

EstateManagementUI.BlazorServer/Components/Pages/MerchantInfo.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<div class="bg-gray-50 rounded-lg p-6 text-center">
4141
<p class="text-gray-700 mb-4">Sign in to access full merchant management features</p>
4242
<div class="flex justify-center space-x-4">
43-
<a href="/login" class="inline-flex items-center px-6 py-3 bg-green-600 hover:bg-green-700 text-white font-semibold rounded-lg shadow-md transition-colors duration-150">
43+
<a id="loginButton" href="/login" class="inline-flex items-center px-6 py-3 bg-green-600 hover:bg-green-700 text-white font-semibold rounded-lg shadow-md transition-colors duration-150">
4444
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
4545
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1"></path>
4646
</svg>

EstateManagementUI.BlazorServer/Components/Pages/Merchants/Index.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<!-- Page Header -->
1010
<div class="flex items-center justify-between">
1111
<h1 class="text-2xl font-bold text-gray-900">Merchant Management</h1>
12-
<button class="btn btn-primary" @onclick="NavigateToNewMerchant">
12+
<button id="newMerchantButton" class="btn btn-primary" @onclick="NavigateToNewMerchant">
1313
<svg class="w-5 h-5 inline-block mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
1414
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path>
1515
</svg>

EstateManagementUI.BlazorServer/Components/Pages/Merchants/New.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
<button type="button" class="btn btn-secondary" @onclick="Cancel" disabled="@isSaving">
151151
Cancel
152152
</button>
153-
<button type="submit" class="btn btn-primary" disabled="@isSaving">
153+
<button id="createMerchantButton" type="submit" class="btn btn-primary" disabled="@isSaving">
154154
@if (isSaving)
155155
{
156156
<span class="inline-block animate-spin rounded-full h-4 w-4 border-b-2 border-white mr-2"></span>

EstateManagementUI.BlazorServer/Components/Pages/Operators/Index.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<!-- Page Header -->
1010
<div class="flex items-center justify-between">
1111
<h1 class="text-2xl font-bold text-gray-900">Operator Management</h1>
12-
<button class="btn btn-primary" @onclick='() => NavigationManager.NavigateTo("/operators/new")'>
12+
<button id="newOperatorButton" class="btn btn-primary" @onclick='() => NavigationManager.NavigateTo("/operators/new")'>
1313
<svg class="w-5 h-5 inline-block mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
1414
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path>
1515
</svg>

0 commit comments

Comments
 (0)