Skip to content

Commit

Permalink
Merge pull request #167 from bcgov/ricander
Browse files Browse the repository at this point in the history
Ricander
  • Loading branch information
ychung-mot authored Apr 17, 2024
2 parents 7f3808d + 3c516c8 commit 5d93af2
Show file tree
Hide file tree
Showing 13 changed files with 205 additions and 218 deletions.
20 changes: 6 additions & 14 deletions Test/UITest/Configuration/AppSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,22 @@ namespace Configuration
{
public class AppSettings
{
IConfiguration _Configuration;
IConfiguration configuration;
string environment;
IConfigurationSection usersSection;

public AppSettings()
{
environment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Local";
_Configuration = new ConfigurationBuilder().AddJsonFile($"Appsettings.{environment}.json", optional: true, reloadOnChange: true).Build();
configuration = new ConfigurationBuilder().AddJsonFile($"Appsettings.{environment}.json", optional: true, reloadOnChange: true).Build();
usersSection = configuration.GetSection("Users");
}

public string GetValue(string Variable)
public string GetValue(string Key)
{
string variableValue = _Configuration[Variable];

if (variableValue != null)
{
return (variableValue);
}
else
{
return (null);
}
return (usersSection[Key]);
}

}

}

54 changes: 22 additions & 32 deletions Test/UITest/SpecFlowProjectBDD/Features/ManagingAccess.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,75 +5,65 @@ Link to a feature: https://hous-hpb.atlassian.net/browse/DSS-54
Scenario: ManagingAccess
#User Authentication

Given that I am an authenticated government user and the expected result is "<ExpectedResult>"
Given that I am an authenticated government user "<UserName>" and the expected result is "<ExpectedResult>"

When I access the administrative interface of the system
When I access the administrative interface of the system

Then There should be a dedicated section for managing user access requests
Then There should be a dedicated section for managing user access requests

#User Access Request List:

When I navigate to the user access request section
When I navigate to the user access request section

Then I should see a list displaying all user access requests, including relevant details such as the user's name, role request, and date of submission
Then I should see a list displaying all user access requests, including relevant details such as the user's name, role request, and date of submission

#Request Details:

When Reviewing a specific access request
When Reviewing a specific access request

Then I should be able to view detailed information provided by the user, including their role request and any justifications or additional comments
Then I should be able to view detailed information provided by the user, including their role request and any justifications or additional comments

#Grant Access Button:

When Reviewing an access request
When Reviewing an access request

Then There should be a Grant Access button allowing me to approve the user's request
Then There should be a Grant Access button allowing me to approve the user's request

#Role Assignment:

When Clicking the Grant Access button
When Clicking the Grant Access button

Then I should be prompted to assign the appropriate roles to the user based on their request and the system's role hierarchy
Then I should be prompted to assign the appropriate roles to the user based on their request and the system's role hierarchy

#Deny Access Option:

When Reviewing an access request for denial
When Reviewing an access request for denial

Then There should be a Deny Access option allowing me to reject the user's request if it is deemed inappropriate or unnecessary
Then There should be a Deny Access option allowing me to reject the user's request if it is deemed inappropriate or unnecessary

#Remove Access Option:

When Reviewing an access request that has been granted
When Reviewing an access request that has been granted

Then There should be a Remove Access option allowing me to remove the user's access if it is deemed inappropriate or unnecessary
Then There should be a Remove Access option allowing me to remove the user's access if it is deemed inappropriate or unnecessary

#Confirmation Message:

When Granting or denying access
When Granting or denying access

Then I should receive a confirmation message indicating the success of the action taken, and the user should be notified accordingly
Then I should receive a confirmation message indicating the success of the action taken, and the user should be notified accordingly

#User Access Status Updates:

When Managing user access requests
When Managing user access requests

Then The access request list should dynamically update to reflect the current status approved or denied of each request
Then The access request list should dynamically update to reflect the current status approved or denied of each request

#
#
Examples:
| ListingID | Description | ExpectedResult | ListingURL | AdditionalCCsTextBox | GovPhoneNumber | TakedownReason |
| 0 | ListingID - Boundary | pass | http://listingURL.com | richard.anderson@dxc.com | 9991231234 | Get a business license |
# | 9223372036854775807 | ListingID - Test for Max value | pass | http://listingURL.com | [email protected] | 9991231234 | Get a business license |
# | 0 | ListingURL - Valid URL | pass | HTTP://listingURL.com | [email protected] | 9991231234 | Get a business license |
# | 0 | ListingURL - Valid URL | pass | HTTPS://listingURL.com | [email protected] | 9991231234 | Get a business license |
# | 0 | ListingURL - Long URL SSL | pass | http://ReallylongURLstring123123123123123123123123123123.com | [email protected] | 9991231234 | Get a business license |
# | 0 | Phone Number - Valid '-' | pass | http://ReallylongURLstring123123123123123123123123123123.com | [email protected] | 999-123-1234 | Get a business license |
# | 0 | Phone Number - Valid '(' | pass | http://ReallylongURLstring123123123123123123123123123123.com | [email protected] | (999)1231234 | Get a business license |
# | 0 | Phone Number - Valid '- and (' | pass | http://ReallylongURLstring123123123123123123123123123123.com | [email protected] | (999)-123-1234 | Get a business license |
# | -1 | ListingID - Negative number test | Pass | http://listingURL.com | [email protected] | 9991231234 | Get a business license |
# | test | ListingID - Test for string | Pass | http://listingURL.com | [email protected] | 9991231234 | Get a business license |
# | e | ListingID - Test for exponential | Pass | http://listingURL.com | [email protected] | 9991231234 | Get a business license |
# | 0 | ListingURL - Invalid URL | fail | http://listingURL | [email protected] | 9991231234 | Get a business license |
| UserName | ListingID | Description | ExpectedResult | ListingURL | AdditionalCCsTextBox | GovPhoneNumber | TakedownReason |
| CEUATST | 0 | ListingID - Boundary | pass | http://listingURL.com | richard.anderson@dxc.com | 9991231234 | Get a business license |



44 changes: 23 additions & 21 deletions Test/UITest/SpecFlowProjectBDD/Features/ManagingAccess.feature.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5d93af2

Please sign in to comment.