Skip to content

Commit 63ebf1f

Browse files
authored
Merge pull request #573 from bcgov/ricander
Ricander
2 parents d6efabe + 402dbdd commit 63ebf1f

25 files changed

+1683
-151
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"Users": {
3+
4+
"User1": "password",
5+
"User2": "password"
6+
},
7+
"Servers": {
8+
"dev": "https://URL:PORT",
9+
"default": "http://URL:PORT"
10+
},
11+
"ConnectionStrings": {
12+
"dev": "Host=localhost; Database=<DatabaseName>; Username=<DBUSER>; Password=<DBPASSWORD>",
13+
"default": "Host=localhost; Database=<DatabaseName>; Username=<DBUSER>; Password=<DBPASSWORD>"
14+
},
15+
"ListingFiles": {
16+
"File1": "C:\\<PATHTOLISTINGFILE>\\listing-valid-2024-03.csv"
17+
}
18+
}

Test/UITest/Configuration/Configuration.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
</ItemGroup>
1313

1414
<ItemGroup>
15+
<None Update="AppSettings.environment.json">
16+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
17+
</None>
1518
<None Update="AppSettings.uat.json">
1619
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
1720
</None>

Test/UITest/DataBase/UnitOfWork/IUnitOfWork.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ public interface IUnitOfWork
2424
GenericRepository<DssUserRoleAssignment> DssUserRoleAssignmentRepository { get; }
2525
GenericRepository<DssUploadDelivery> DssUploadDeliveryRepository { get; }
2626
GenericRepository<DssUploadLine> DssUploadLineRepository { get; }
27+
GenericRepository<DssRentalListingContact> DssRentalListingContactRepository { get; }
28+
GenericRepository<DssRentalListing> DssRentalListingRepository { get; }
29+
30+
2731
void ResetDB();
2832
void Dispose();
2933
void Save();

Test/UITest/DataBase/UnitOfWork/UnitOfWork.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ public class UnitOfWork : IDisposable, IUnitOfWork
3030
private readonly GenericRepository<DssUploadLine> _DssUploadLineRepository;
3131
private readonly GenericRepository<DssUserRole> _DssUserRoleRepository;
3232
private readonly GenericRepository<DssUserRoleAssignment> _DssUserRoleAssignmentRepository;
33+
private readonly GenericRepository<DssRentalListingContact> _DssRentalListingContactRepository;
34+
private readonly GenericRepository<DssRentalListing> _DssRentalListingRepository;
3335

3436

3537
public GenericRepository<DssAccessRequestStatus> DssAccessRequestStatusRepository
@@ -100,6 +102,18 @@ public GenericRepository<DssUserRoleAssignment> DssUserRoleAssignmentRepository
100102
get => _DssUserRoleAssignmentRepository ?? new GenericRepository<DssUserRoleAssignment>(_context);
101103
}
102104

105+
public GenericRepository<DssRentalListingContact> DssRentalListingContactRepository
106+
{
107+
get => _DssRentalListingContactRepository ?? new GenericRepository<DssRentalListingContact>(_context);
108+
}
109+
110+
public GenericRepository<DssRentalListing> DssRentalListingRepository
111+
{
112+
get => _DssRentalListingRepository ?? new GenericRepository<DssRentalListing>(_context);
113+
}
114+
115+
116+
103117
public UnitOfWork(DbContext context)
104118
{
105119
if (context != null)

Test/UITest/SpecFlowProjectBDD/Features/SendTakeDownRequestWithoutADSSListing.feature

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,13 @@ Scenario: SendTakedownRequestWithoutADSSListing
7575
Then the system should provide clear error messages guiding me on how to correct the issues
7676

7777
Examples:
78-
| UserName | ListingID | Description | ExpectedResult | ListingURL | AdditionalCCsTextBox | Comment |
79-
| STRDSSLg1Dev | 0 | ListingID - Boundary | pass | http://listingURL.com | richard.anderson@dxc.com | |
80-
| STRDSSLg1Dev | 9223372036854775807 | ListingID - Test for Max value | pass | http://listingURL.com | richard.anderson@dxc.com | |
81-
| STRDSSLg1Dev | 0 | ListingURL - Valid URL | pass | HTTP://listingURL.com | richard.anderson@dxc.com | |
82-
| STRDSSLg1Dev | 0 | ListingURL - Valid URL SSL | pass | HTTPS://listingURL.com | richard.anderson@dxc.com | |
83-
| STRDSSLg1Dev | 0 | ListingURL - Long URL | pass | http://ReallylongURLstring123123123123123123123123123123.com | richard.anderson@dxc.com | |
84-
| STRDSSLg1Dev | -1 | ListingID - Negative number test | pass | http://listingURL.com | richard.anderson@dxc.com | Should pass because non-numberic values are ignored and Listing ID is optional |
85-
| STRDSSLg1Dev | test | ListingID - Test for string | pass | http://listingURL.com | richard.anderson@dxc.com | should pass because non-numberic values are ignored and Listing ID is optional |
86-
| STRDSSLg1Dev | e | ListingID - Test for exponential | pass | http://listingURL.com | richard.anderson@dxc.com | should pass because non-numberic values are ignored and Listing ID is optional |
87-
| STRDSSLg1Dev | 0 | ListingURL - Invalid URL | fail | http://listingURL | richard.anderson@dxc.com | |
78+
| UserName | ListingID | Description | ExpectedResult | ListingURL | AdditionalCCsTextBox | Comment |
79+
| STRDSSLg1Dev | 0 | ListingID - Boundary | pass | http://listingURL.com | richard.anderson@dxc.com | |
80+
| STRDSSLg1Dev | 9223372036854775807 | ListingID - Test for Max value | pass | http://listingURL.com | richard.anderson@dxc.com | |
81+
| STRDSSLg1Dev | 0 | ListingURL - Valid URL | pass | HTTP://listingURL.com | richard.anderson@dxc.com | |
82+
| STRDSSLg1Dev | 0 | ListingURL - Valid URL SSL | pass | HTTPS://listingURL.com | richard.anderson@dxc.com | |
83+
| STRDSSLg1Dev | 0 | ListingURL - Long URL | pass | http://ReallylongURLstring123123123123123123123123123123.com | richard.anderson@dxc.com | |
84+
| STRDSSLg1Dev | -1 | ListingID - Negative number test | pass | http://listingURL.com | richard.anderson@dxc.com | Should pass because non-numberic values are ignored and Listing ID is optional |
85+
| STRDSSLg1Dev | test | ListingID - Test for string | pass | http://listingURL.com | richard.anderson@dxc.com | should pass because non-numberic values are ignored and Listing ID is optional |
86+
| STRDSSLg1Dev | e | ListingID - Test for exponential | pass | http://listingURL.com | richard.anderson@dxc.com | should pass because non-numberic values are ignored and Listing ID is optional |
87+
| STRDSSLg1Dev | 0 | ListingURL - Invalid URL | fail | http://listingURL | richard.anderson@dxc.com | |

Test/UITest/SpecFlowProjectBDD/Features/SendingMultipleNoticesOfNonCompliance.feature

Lines changed: 34 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,75 @@
11
Feature: SendingMultipleNoticesOfNonCompliance
22

3-
Link to a feature: https://hous-hpb.atlassian.net/browse/DSS-57
4-
#, https://hous-hpb.atlassian.net/browse/DSS-104
3+
Link to a feature: https://hous-hpb.atlassian.net/browse/DSS-678
54

65
@Scenario
7-
@TermsAndConditions
6+
@SendingMultipleNoticesOfNonCompliance
87
Scenario: SendingMultipleNoticesOfNonCompliance
98

109
#Preconditions:
1110
#• LG user has valid login credentials.
1211
#• Listings are available for selection.
1312

14-
When a LG User Navigate to Login Page
15-
# LG user navigates to login page.
13+
# When a LG User Navigate to Login Page.
1614
# Login:
17-
And user enters valid login credentials and clicks “Login" button
15+
16+
Given that I am an authenticated User "<UserName>" and the expected result is "<ExpectedResult>" and I am a "<UserType>" user
17+
1818
# System verifies credentials and logs user in.
1919
Then LG user is redirected to dashboard-> Hompage
20+
2021
# Navigate to Listings:
21-
When LG user selects "View Listings" from menu to load listings data page. Or User navigates to view listing data on homepage Screen
22+
When LG user selects 'View Listings' from menu to load listings data page. Or User navigates to view listing data on homepage Screen
23+
2224
# Initial State:
23-
Then the Send Notices of Non-Compliance button is disabled at this stage
24-
When LG USer Select Multiple Listings:
25-
Then the “Send Notices of Non-Compliance" button is enabled
26-
# Click Send Notices of Non-Compliance:
27-
When LG user clicks “Send Notices of Non-Compliance" button
28-
Then system opens details to complete fields for sending notices
25+
Then the Send Notices of Non-Compliance button is disabled
26+
#
27+
When LG User Select Multiple Listings
28+
Then the Send Notices of Non-Compliance button is enabled
29+
30+
# Click Send Notices of Non-Compliance
31+
Then LG user clicks Non-Compliance button
32+
Then system opens details to complete fields for sending notices
33+
2934
# Mandatory Fields Check:
3035
Then the “Review" button is disabled if any mandatory field is not completed
31-
Then If LG user clicks "Cancel", system prompts with a re-confirmation message
36+
Then If LG user clicks Cancel, system prompts with a re-confirmation message
3237
Then If user confirms cancellation, user is redirected back to listings data page
3338
And the action history is not updated when the user cancels the action
3439
When user does not confirm, user remains on current page.
35-
And Action History Not Updated
40+
And Action History Not Updated
41+
3642
# Verify that the action history is not updated when the user cancels the action.
3743
# Complete Mandatory Fields:
3844
When LG user completes mandatory fields. ( Provide a LG email address to receive a copy of the Notice)
45+
3946
# Complete Optional Fields:
4047
Then that LG user can add BCCs
48+
4149
# Check State of "Review" Button
4250
# LG user also verify the "Review" button is disabled if user inputs an email that is not in the correct format, with a note (ensure the email format you have entered is correct) to prompt user
4351
When the LG User enters an Email Address
4452
Then if user inputs an email that is not in the correct format the user is prompted to enter an email address in the correct format
53+
4554
# Then (ensure the email format you have entered is correct) to prompt user
46-
And the user can add multiple email addresses
47-
And Verify that if remove the listing checkbox is unchecked, review is also disabled
55+
And the user can add multiple email addresses
56+
And Verify that if remove the listing checkbox is unchecked, review is also disabled
57+
4858
# Review and Submit Notices:
4959
When the LG user clicks “Review" button to confirm details to be sent
50-
And the LG user selects "Submit"
51-
Then Successful confirmation is displayed for user on top Right of the page
52-
Then System immediately sends notices to platform/host for selected listings
53-
And A copy email is also sent to LG email address added to receive a copy of the notice same, a copy of email to bcc
60+
And the LG user selects the Submit button
61+
Then Successful confirmation is displayed for user on top Right of the page
62+
Then System immediately sends notices to platform/host for selected listings
63+
And A copy email is also sent to LG email address added to receive a copy of the notice same, a copy of email to bcc
5464
And Action history is updated immediately with action taken
5565
And On the listings page, last action and last action date should be updated
5666

5767
# Scenarios 1:LG user selects multiple listings from available listing data .
5868
# Scenario 2: LG user selects listings from different platforms
5969
Examples:
60-
| UserName | RoleName | Email | Environment | ExpectedResult |
61-
| CEUATST | ceu_admin | ceuatst@gov.bc.ca | all | pass |
62-
#| STRDSSLg1Dev | lg_staff | ceuatst@gov.bc.ca | all | pass |
70+
| UserName | TypeOfNotice | UserType | Email | BCC | Environment | ExpectedResult |
71+
| STRDSSLg1Dev | Non-Compliance | lg_staff | richard.anderson@gov.bc.ca | | dev | pass |
72+
6373

6474

6575

0 commit comments

Comments
 (0)