Skip to content

Commit e57b8a1

Browse files
Add name attributes to merchant form inputs for test automation
Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
1 parent ff2c6a7 commit e57b8a1

2 files changed

Lines changed: 20 additions & 20 deletions

File tree

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,26 +113,26 @@
113113
<label class="block text-sm font-medium text-gray-700 mb-1">
114114
Address Line 1 <span class="text-red-500">*</span>
115115
</label>
116-
<InputText @bind-Value="addressModel.AddressLine1" class="input w-full" />
116+
<InputText @bind-Value="addressModel.AddressLine1" class="input w-full" name="AddressLine1" />
117117
<ValidationMessage For="@(() => addressModel.AddressLine1)" class="text-red-600 text-sm mt-1" />
118118
</div>
119119
<div>
120120
<label class="block text-sm font-medium text-gray-700 mb-1">Address Line 2</label>
121-
<InputText @bind-Value="addressModel.AddressLine2" class="input w-full" />
121+
<InputText @bind-Value="addressModel.AddressLine2" class="input w-full" name="AddressLine2" />
122122
</div>
123123
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
124124
<div>
125125
<label class="block text-sm font-medium text-gray-700 mb-1">
126126
Town <span class="text-red-500">*</span>
127127
</label>
128-
<InputText @bind-Value="addressModel.Town" class="input w-full" />
128+
<InputText @bind-Value="addressModel.Town" class="input w-full" name="Town" />
129129
<ValidationMessage For="@(() => addressModel.Town)" class="text-red-600 text-sm mt-1" />
130130
</div>
131131
<div>
132132
<label class="block text-sm font-medium text-gray-700 mb-1">
133133
Region <span class="text-red-500">*</span>
134134
</label>
135-
<InputText @bind-Value="addressModel.Region" class="input w-full" />
135+
<InputText @bind-Value="addressModel.Region" class="input w-full" name="Region" />
136136
<ValidationMessage For="@(() => addressModel.Region)" class="text-red-600 text-sm mt-1" />
137137
</div>
138138
</div>
@@ -141,14 +141,14 @@
141141
<label class="block text-sm font-medium text-gray-700 mb-1">
142142
PostCode <span class="text-red-500">*</span>
143143
</label>
144-
<InputText @bind-Value="addressModel.PostalCode" class="input w-full" />
144+
<InputText @bind-Value="addressModel.PostalCode" class="input w-full" name="PostCode" />
145145
<ValidationMessage For="@(() => addressModel.PostalCode)" class="text-red-600 text-sm mt-1" />
146146
</div>
147147
<div>
148148
<label class="block text-sm font-medium text-gray-700 mb-1">
149149
Country <span class="text-red-500">*</span>
150150
</label>
151-
<InputText @bind-Value="addressModel.Country" class="input w-full" />
151+
<InputText @bind-Value="addressModel.Country" class="input w-full" name="Country" />
152152
<ValidationMessage For="@(() => addressModel.Country)" class="text-red-600 text-sm mt-1" />
153153
</div>
154154
</div>
@@ -176,21 +176,21 @@
176176
<label class="block text-sm font-medium text-gray-700 mb-1">
177177
Contact Name <span class="text-red-500">*</span>
178178
</label>
179-
<InputText @bind-Value="contactModel.ContactName" class="input w-full" />
179+
<InputText @bind-Value="contactModel.ContactName" class="input w-full" name="ContactName" />
180180
<ValidationMessage For="@(() => contactModel.ContactName)" class="text-red-600 text-sm mt-1" />
181181
</div>
182182
<div>
183183
<label class="block text-sm font-medium text-gray-700 mb-1">
184184
Email Address <span class="text-red-500">*</span>
185185
</label>
186-
<InputText @bind-Value="contactModel.ContactEmailAddress" type="email" class="input w-full" />
186+
<InputText @bind-Value="contactModel.ContactEmailAddress" type="email" class="input w-full" name="EmailAddress" />
187187
<ValidationMessage For="@(() => contactModel.ContactEmailAddress)" class="text-red-600 text-sm mt-1" />
188188
</div>
189189
<div>
190190
<label class="block text-sm font-medium text-gray-700 mb-1">
191191
Phone Number <span class="text-red-500">*</span>
192192
</label>
193-
<InputText @bind-Value="contactModel.ContactPhoneNumber" type="tel" class="input w-full" />
193+
<InputText @bind-Value="contactModel.ContactPhoneNumber" type="tel" class="input w-full" name="PhoneNumber" />
194194
<ValidationMessage For="@(() => contactModel.ContactPhoneNumber)" class="text-red-600 text-sm mt-1" />
195195
</div>
196196
<div class="flex justify-end pt-4">

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@
3939
<label class="block text-sm font-medium text-gray-700 mb-1">
4040
Merchant Name <span class="text-red-500">*</span>
4141
</label>
42-
<InputText @bind-Value="model.MerchantName" class="input w-full" placeholder="Enter merchant name" />
42+
<InputText @bind-Value="model.MerchantName" class="input w-full" placeholder="Enter merchant name" name="MerchantName" />
4343
<ValidationMessage For="@(() => model.MerchantName)" class="text-red-600 text-sm mt-1" />
4444
</div>
4545

4646
<div>
4747
<label class="block text-sm font-medium text-gray-700 mb-1">
4848
Settlement Schedule <span class="text-red-500">*</span>
4949
</label>
50-
<InputSelect @bind-Value="model.SettlementSchedule" class="input w-full">
50+
<InputSelect @bind-Value="model.SettlementSchedule" class="input w-full" name="SettlementSchedule">
5151
<option value="">Select a schedule...</option>
5252
<option value="Immediate">Immediate</option>
5353
<option value="Weekly">Weekly</option>
@@ -66,31 +66,31 @@
6666
<label class="block text-sm font-medium text-gray-700 mb-1">
6767
Address Line 1 <span class="text-red-500">*</span>
6868
</label>
69-
<InputText @bind-Value="model.AddressLine1" class="input w-full" placeholder="Enter address line 1" />
69+
<InputText @bind-Value="model.AddressLine1" class="input w-full" placeholder="Enter address line 1" name="AddressLine1" />
7070
<ValidationMessage For="@(() => model.AddressLine1)" class="text-red-600 text-sm mt-1" />
7171
</div>
7272

7373
<div>
7474
<label class="block text-sm font-medium text-gray-700 mb-1">
7575
Address Line 2
7676
</label>
77-
<InputText @bind-Value="model.AddressLine2" class="input w-full" placeholder="Enter address line 2 (optional)" />
77+
<InputText @bind-Value="model.AddressLine2" class="input w-full" placeholder="Enter address line 2 (optional)" name="AddressLine2" />
7878
</div>
7979

8080
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
8181
<div>
8282
<label class="block text-sm font-medium text-gray-700 mb-1">
8383
Town <span class="text-red-500">*</span>
8484
</label>
85-
<InputText @bind-Value="model.Town" class="input w-full" placeholder="Enter town" />
85+
<InputText @bind-Value="model.Town" class="input w-full" placeholder="Enter town" name="Town" />
8686
<ValidationMessage For="@(() => model.Town)" class="text-red-600 text-sm mt-1" />
8787
</div>
8888

8989
<div>
9090
<label class="block text-sm font-medium text-gray-700 mb-1">
9191
Region <span class="text-red-500">*</span>
9292
</label>
93-
<InputText @bind-Value="model.Region" class="input w-full" placeholder="Enter region" />
93+
<InputText @bind-Value="model.Region" class="input w-full" placeholder="Enter region" name="Region" />
9494
<ValidationMessage For="@(() => model.Region)" class="text-red-600 text-sm mt-1" />
9595
</div>
9696
</div>
@@ -100,15 +100,15 @@
100100
<label class="block text-sm font-medium text-gray-700 mb-1">
101101
PostCode <span class="text-red-500">*</span>
102102
</label>
103-
<InputText @bind-Value="model.PostCode" class="input w-full" placeholder="Enter postcode" />
103+
<InputText @bind-Value="model.PostCode" class="input w-full" placeholder="Enter postcode" name="PostCode" />
104104
<ValidationMessage For="@(() => model.PostCode)" class="text-red-600 text-sm mt-1" />
105105
</div>
106106

107107
<div>
108108
<label class="block text-sm font-medium text-gray-700 mb-1">
109109
Country <span class="text-red-500">*</span>
110110
</label>
111-
<InputText @bind-Value="model.Country" class="input w-full" placeholder="Enter country" />
111+
<InputText @bind-Value="model.Country" class="input w-full" placeholder="Enter country" name="Country" />
112112
<ValidationMessage For="@(() => model.Country)" class="text-red-600 text-sm mt-1" />
113113
</div>
114114
</div>
@@ -123,23 +123,23 @@
123123
<label class="block text-sm font-medium text-gray-700 mb-1">
124124
Contact Name <span class="text-red-500">*</span>
125125
</label>
126-
<InputText @bind-Value="model.ContactName" class="input w-full" placeholder="Enter contact name" />
126+
<InputText @bind-Value="model.ContactName" class="input w-full" placeholder="Enter contact name" name="ContactName" />
127127
<ValidationMessage For="@(() => model.ContactName)" class="text-red-600 text-sm mt-1" />
128128
</div>
129129

130130
<div>
131131
<label class="block text-sm font-medium text-gray-700 mb-1">
132132
Email Address <span class="text-red-500">*</span>
133133
</label>
134-
<InputText @bind-Value="model.EmailAddress" type="email" class="input w-full" placeholder="Enter email address" />
134+
<InputText @bind-Value="model.EmailAddress" type="email" class="input w-full" placeholder="Enter email address" name="EmailAddress" />
135135
<ValidationMessage For="@(() => model.EmailAddress)" class="text-red-600 text-sm mt-1" />
136136
</div>
137137

138138
<div>
139139
<label class="block text-sm font-medium text-gray-700 mb-1">
140140
Phone Number <span class="text-red-500">*</span>
141141
</label>
142-
<InputText @bind-Value="model.PhoneNumber" type="tel" class="input w-full" placeholder="Enter phone number" />
142+
<InputText @bind-Value="model.PhoneNumber" type="tel" class="input w-full" placeholder="Enter phone number" name="PhoneNumber" />
143143
<ValidationMessage For="@(() => model.PhoneNumber)" class="text-red-600 text-sm mt-1" />
144144
</div>
145145
</div>

0 commit comments

Comments
 (0)