Skip to content

Commit

Permalink
New features (#281)
Browse files Browse the repository at this point in the history
* Updated FTs  as per the mock data

* AB#144988 Formatted code and removed unused code

* Updated filed as per the mock data

* Updated test data as per the mock data

* Updated test data as per the mock data

* Fixed failing FT

* Added wait time

* AB#145088 resolved review comment

* AB#145084 resolved review comments

* AB#145088 UT change for code coverage

* Updated Download valid encs file

* Fixed failing FTs

* FTs added

* AB#145084 Resolved review comments

* AB#144988 Added FT

* Minor code n formatting Change

* Modify FT

* Fixed failing FT

* AB#144988 Removed failing unused UTs

* Added  one more FT

* AB#144988 Removed duplicate code

* Added FT

* Added fix for failing FT

* Fixed failing FTs

* minor change

* AB#145062 Added Code changes

* AB#145062 Added Unit Tests

* AB#145058 modify code

* AB#145058 renamed the ut

* AB#145059 Added Unit tests

* Added FT

* AB#145059 Removed variable  from config

* AB#145062 Updated UTs name

* AB#145058 added unit test cases

* AB#145062 Updated Unit test assert

* Modify FT

* AB#145058 - Added FTs

* Resolved review comment

* Fixed failing FT

* removed avgSizeofENCinMB

* AB#145059 Resolved Review Comments

* Resolved review comments

* AB#145058 Formatted unit test file

* AB# 145062 Added FT

* Added one more validation for FT

* Modify the validation method

* Minor change

* Added FT

* Resolved review comment

* Minor change

* AB#145063 Fixed observation for request encs

* fixed estimated file size to 2 decimal points, modified UTs

* Minor change

* fixed UT

* AB# Removed unused line of code

* added vite in suppression file

* AB# Added condition for all invalid encs for base

* Fixed failing FT

* Fixed failing FT

* Added wait time for flaky FTs

* added axios to suppression

* AB144889 added updated code

* AB#144889 - Added accessibility test

* Resolved review comment

* AB# added unit tests for code coverage

* Updated the locator path

* AB#144889 - Fixed failing accessibility test

* AB#144889 added start again link

* Added start again link

* AB# Added unit test for start again link

* AB# updated delta date info message

* AB#151522 Ukho user validation and UT changes

* AB#151728 right block removed and UT minor changes

* npm audit fix

* AB156008 Added code changes for Scroller

* AB#151567 Added radio button and style

* ui changes AB#151726

* AB#151726 modified ui chnages

* AB#151726 modified ui chnages

* Updated FT as per UI changes

* AB#151728 removed error related code.

* AB#151726 fixed failing ut

* AB#156127 updated warning messages

* AB#156127 code changes for ess add single enc

* AB#151522 variable name changes

* AB#151567 code changes

* AB#151726 -Updated FT as per UI changes.

* AB#156008 code change to hide size for s57

* AB#151567 added UTs

* AB#151726 - Updated FT

* devops configuration changes

* fixed issue AB#151726

* AB#151726 - Minor change

* AB#151726 minor design change

* AB#151726 removed unwanted style

* fixed default value when deselct all and reselect

* AB#156127 updated warning messages

* AB#156008 updated packages

* AB#151726 reverted the ui change

* AB#151522 added ut

* AB#151567 Added zipType variable, added header to api

* Added unit test

* Updates package

* AB#151567 code changes

* AB#151567 Added unit tests

* AB#156008 added unit tests

* AB#151522 package update

* AB#156127 added condition for aio

* AB# 151567 Added FT

* AB#151567 resolved review comment

* AB#156127 updated error message

* AB# 156127 Added FT

* AB#151567 Aligned style of radio buttons to requestEnc button

* AB# 156008 Added FT

* fixed style rule

* AB#156127 updated and removed unnecessary message

* AB#156127 Added minor code changes

* AB# 156127 minor change

* AB#156127 minor change

* AB#151567 spelling correction as per feedback

* AB#-151567 Updated the FTs as per changes

* AB#151726 modify header

* AB# 151567 Fixed failing FT

* AB# 151567 Updated Locator

* 151567 changes for FTs with admin domain tags AB#151567

* AB# 151726 Minor change

* AB# 151567 Fixed failing FT

* 151567 Changes to set order for functional tests execution AB#151567

* AB# 151567 fixed failing FT

* AB#156127 Updated packages

* AB# 151567 Updated FT

* 151567 add condition in a task to set  admin domain as environment variable AB#151567

* Updated failing FTs

* AB# 151567 Minor change

* Updated non admin domains

* AB#156127 added unit tests for code coverage

* updated yml file

* yml changes

* AB#151522 code change and develop branch merge

* AB#151522 Handled null and added endswithfunction for email claim

* Added additional test user and made corresponding changes to FTs and azure.yml file.

* ui changes AB#151726

* AB#151726 modified ui chnages

* AB#151726 modified ui chnages

* AB#151726 fixed failing ut

* AB#151726 -Updated FT as per UI changes.

* AB#151726 - Updated FT

* AB#151726 minor design change

* AB#151726 - Minor change

* AB#151726 removed unwanted style

* AB#151726 reverted the ui change

* AB#151726 modify header

* AB# 151726 Minor change

* AB#151728 right block removed and UT minor changes

* AB#151728 removed error related code.

* Updated FT as per UI changes

* AB#151522 code change and develop branch merge

* AB#151522 Handled null and added endswithfunction for email claim

* Merged develop branch

* AB#151567 resolved merge conflict

* Removed duplicate test

* AB#156127 Lower case E updated in Estimated exchange set size sentence for consistency

* AB#156127 Removed unnecssary s from exchanges word

* Dev/151569 ensure accessibility compliance for s57 (#272)

* AB#151569 Added code changes

* package suppressed

* AB# 151569 Updated locators

---------

Co-authored-by: ajay15273 <[email protected]>
Co-authored-by: Suraj Singh <[email protected]>
Co-authored-by: ankush365 <[email protected]>

* Maintenance Update (#278)

* Fixing Tests

* increase timeout an change enc name

* Reduce timeout and try new deployment pool

* Revert to Ubuntu 1804
Update test

* Fix bug in Fix

* Change ENC names and timeout duration

* Remove invalid ENC

* Adjust tests to ignore additional invalid ENCs

* checks for the presence of specific key phrase

* Optimize ESS UI test flow and update ENC limits

- In `ess-ui-exchangesetselectionpage.spec.ts`, optimized functional test scenarios by adding conditional checks to avoid unnecessary steps when there are no updates. Specifically, removed unconditional waits and checks, and introduced a condition to only execute certain steps if updates are present. Added explanatory comments for clarity.

- Updated `appconfig.json` to decrease `MaxEncLimit` and `MaxEncSelectionLimit` from `250` to `100`, reflecting a decision to limit the number of ENC (Electronic Navigational Charts) that can be selected or processed at a time for performance reasons or to comply with new policies or technical constraints.

* Disable tests for data issues

Temporarily disabled multiple tests across spec files due to issues with the test data. These tests are related to user interactions and functionalities on the ESS UI ENCs Selection Page, ESS UI ES Download Page, and FSS Search Query scenarios. Specifically, tests verifying user permissions, estimated file sizes, and download capabilities for Delta exchange sets, as well as tests for the Batch Attribute table's file size filtering, have been commented out. Each disabled test is marked with "rhz" initials and a note for clarity. This action is taken to prevent false test results stemming from current test data problems, with plans to revisit and reactivate the tests once the data issues are resolved.

* Disable additional test

* Refine drag-and-drop test scenarios

Split the combined .csv and .text file drag-and-drop test into separate scenarios for improved clarity and specificity. Removed redundant steps in the .csv file test, focusing on drag-and-drop verification. Added a new test scenario for .text file drag-and-drop, ensuring both file types are individually assessed. Changes are linked to a specific Azure DevOps work item, indicating task or bug fix integration.

* Add .NET SDK 8.0.x setup task to pipeline

Added a task named 'Use .NET 8.0.x sdk' in the `azure-pipelines.yml` to ensure the build process uses the .NET SDK version 8.0.x. This task is configured with the necessary inputs for the package type, version, and working directory, aligning the build environment with the required .NET SDK version.

* Add CVE & GHSA suppressions for ws package

Added new suppression entries in NVDSuppressions.xml for the `ws` package versions 8.14.1 and 8.16.0 to address specific CVEs and a GHSA advisory. These suppressions are based on the rationale that the server functionality of the `ws` package, which is the component likely affected by these vulnerabilities, is not utilized within our project. Specifically, suppressions for CVE-2024-37890 and GHSA-3h5v-q93c-6h6q were added for both versions, with an additional entry for `8.16.0` that duplicates the CVE-2024-37890 suppression and includes a `cpe` identifier for the `ws` package.

* Add suppression for `braces` vulnerability

Added a new suppression entry in `NVDSuppressions.xml` for the `braces` package version 3.0.2, addressing the vulnerability identified by GHSA-grv7-fg5c-xmjg. The suppression specifies the package URL with a regex matching any version of `braces` and includes the CPE identifier for the `braces` project.

* Update waitFor method in ESS UI test

Updated the `ess-ui-landingpage.spec.ts` test case to use `waitForResponse` instead of `waitForRequest`. This change ensures the test proceeds only after receiving the expected POST response from 'productInformation/productIdentifiers', aiming to improve test reliability by verifying the response rather than just the request initiation.

* Disable ENC payload verification test

The test case "Verify all selected ENCs included in payload in a request." in `ess-ui-esdownloadpage.spec.ts` has been commented out, including its entire block and actions. This decision was made with the suggestion that this test is more suited as an API test rather than its current UI test form. A comment has been added to indicate this reasoning: "// rhz - disabled test, this should probably be a API test". The link to the related Azure work item (https://dev.azure.com/ukhocustomer/File-Share-Service/_workitems/edit/14316) has also been commented out, preserving its reference while indicating the test's current disabled status. The logic within the test is maintained in comments for potential future reactivation or reference.

* Refactor ENC validation test flow

Refactored the `ess-ui-landingpage.spec.ts` test case for validating Base Exchange Set with Valid ENCs. Changes include modifying the sequence of operations and enhancing the handling of network requests. Key adjustments involve  revising the `waitForResponse` method usage to initiate before clicking the proceed button without immediate response awaiting, and improving the response handling mechanism to ensure accurate network request validation.

* Update and disable various tests for accuracy

- Disabled a test in `ess-ui-encselectionpage-nonAdmin.spec.ts` due to test data issues, preventing non-admin users from seeing exchange set format options.
- Corrected expected row count in `ess-ui-encselectionpage.spec.ts` to align with new test requirements.
- Updated a test file and replaced an invalid ENC name in `ess-ui-encselectionpage.spec.ts` for accurate data reflection.
- Modified error message checking method in `ess-ui-encselectionpage.spec.ts` for better reliability with dynamic data.
- Adjusted file size calculation method after ENC removal in `ess-ui-encselectionpage.spec.ts` for accurate user display.
- Enabled a test in `ess-ui-encselectionpage.spec.ts` for UKHO user functionality regarding exchange set format options.
- Disabled multiple tests in `ess-ui-encselectionpage.spec.ts`, `ess-ui-esdownloadpage.spec.ts`, and `ess-ui-landingpage.spec.ts` due to test data issues.
- Replaced invalid ENC names with valid ones in `ess-ui-landingpage.spec.ts` for current data accuracy.
- Replaced a test in `fss-search-query.spec.ts` to reflect no search results accurately, maintaining test suite relevance.

* Add suppression for CVE-2024-39249 in async

Added a new suppression entry to NVDSuppressions.xml for the async package, version 3.2.4, to address CVE-2024-39249. This includes the package URL pattern for npm, a CPE identifier, and detailed notes.

* Readd changes

* Update suppressions

* Add JobId to test artifacts

* Turn off functional tests

* Turn off accessibility tests

* Add new configs and comment out avgSizeofENC

- Commented out `essConfig.avgSizeofENCinMB` as it may be deprecated
- Added `essConfig.apiUiUrl` for API UI access
- Introduced `essConfig.adminDomains` for admin-level domain configuration
- Added `ServiceDnsUrl` with dynamic value assignment for DNS settings

* Enable functional tests and extend timeouts

- Updated `azure-pipelines.yml` to run functional tests by setting `RunFunctionalTests` to `true`.
- Increased global timeout for `expect` in `playwright.config.ts` to 20 seconds.

* Reinstate accessibility tests

* Move to Mare Nectaris and new vNet

* Revert new style subnet

* Update test variable for transform

* Remove unused variables

* Increase playwright timeout to 30000ms

---------

Co-authored-by: ankush365 <[email protected]>
Co-authored-by: Tukaram Pandhare <[email protected]>
Co-authored-by: Anuj P <[email protected]>
Co-authored-by: Prasad Rasal <[email protected]>
Co-authored-by: satyam15302 <[email protected]>
Co-authored-by: rushikeshkhopatkar <[email protected]>
Co-authored-by: shital15683 <[email protected]>
Co-authored-by: ajay15273 <[email protected]>
Co-authored-by: Suraj Singh <[email protected]>
Co-authored-by: Gaurav Mejari <[email protected]>
Co-authored-by: pralesh15295 <[email protected]>
Co-authored-by: Rupali Karawade <[email protected]>
Co-authored-by: rushikeshkhopatkar <[email protected]>
Co-authored-by: Amogh Lanke <[email protected]>
Co-authored-by: Satyam15302 <[email protected]>
Co-authored-by: HugoBurgess <[email protected]>
Co-authored-by: HugoBurgess <[email protected]>
  • Loading branch information
18 people authored Jul 31, 2024
1 parent e61298f commit b43c4cf
Show file tree
Hide file tree
Showing 81 changed files with 4,910 additions and 1,369 deletions.
5 changes: 3 additions & 2 deletions Deployment/src/Modules/Storage/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ resource "azurerm_storage_account" "storage" {
static_website {
index_document = "index.html"
}
network_rules {

network_rules {
default_action = "Deny"
ip_rules = var.allowed_ips
bypass = ["Logging", "Metrics", "AzureServices"]
virtual_network_subnet_ids = [var.hub_n_spoke_subnet,var.agent_subnet]
virtual_network_subnet_ids = [var.hub_n_spoke_subnet, var.agent_subnet]
}

tags = var.tags
Expand Down
7 changes: 3 additions & 4 deletions Deployment/src/Modules/Storage/variables.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

variable "resource_group_name" {
type = string
}
Expand All @@ -19,12 +18,12 @@ variable "tags" {
}

variable "allowed_ips" {

}
variable "hub_n_spoke_subnet" {

variable "hub_n_spoke_subnet" {
type = string
}

variable "agent_subnet" {
type = string
}
}
5 changes: 3 additions & 2 deletions Deployment/src/azure.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ terraform {
key = "terraform.deployment.tfplan"
}
}

provider "azurerm" {
features {}

}
provider "azurerm" {

provider "azurerm" {
features {}
alias = "build_agent"
subscription_id = var.agent_subscription_id
Expand Down
3 changes: 2 additions & 1 deletion Deployment/src/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ data "azurerm_subnet" "hub_n_spoke_subnet" {
virtual_network_name = var.spoke_vnet_name
resource_group_name = var.spoke_rg
}

data "azurerm_subnet" "agent_subnet" {
provider = azurerm.build_agent
name = var.agent_subnet_name
virtual_network_name = var.agent_vnet_name
resource_group_name = var.agent_rg
}

module "storage" {
source = "./Modules/Storage"
name = "${local.service_name}ui${local.env_name}website"
Expand All @@ -20,4 +22,3 @@ module "storage" {
hub_n_spoke_subnet = data.azurerm_subnet.hub_n_spoke_subnet.id
agent_subnet = data.azurerm_subnet.agent_subnet.id
}

7 changes: 3 additions & 4 deletions Deployment/src/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ variable "resource_group_name" {

variable "allowed_ips" {
type = list

}
}

variable "spoke_rg" {
type = string
Expand All @@ -26,7 +25,7 @@ variable "spoke_subnet_name" {
}

locals {
env_name = lower(terraform.workspace)
env_name = lower(terraform.workspace)
service_name = "fss"
tags = {
SERVICE = "File Share Service"
Expand All @@ -52,4 +51,4 @@ variable "agent_subnet_name" {

variable "agent_subscription_id" {
type = string
}
}
7 changes: 7 additions & 0 deletions Deployment/templates/build-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ jobs:
npm ci
displayName: npm restore
- task: UseDotNet@2
displayName: 'Use .NET 8.0.x sdk'
inputs:
packageType: sdk
version: '8.0.x'
workingDirectory: '$(Build.SourcesDirectory)'

- task: CmdLine@1
displayName: Run OWASP dependency-check
inputs:
Expand Down
6 changes: 4 additions & 2 deletions Deployment/templates/continuous-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ jobs:
value: $(essConfig-apiUrl)
- name: essConfig.apiScope
value: $(essConfig-apiScope)
- name: essConfig.avgSizeofENCinMB
value: $(essConfig-avgSizeofENCinMB)
- name: essConfig.defaultEstimatedSizeinMB
value: $(essConfig-defaultEstimatedSizeinMB)
- name: essConfig.MaxEncLimit
Expand All @@ -65,6 +63,10 @@ jobs:
value: $(essConfig-MaxEncSelectionLimit)
- name: essConfig.aioExcludeEncs
value: $(essConfig-aioExcludeEncs)
- name: essConfig.apiUiUrl
value: $(essConfig-apiUiUrl)
- name: essConfig.adminDomains
value: $(essConfig-AdminDomains)
strategy:
runOnce:
deploy:
Expand Down
4 changes: 3 additions & 1 deletion Deployment/templates/playwright-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
value: $(autoTestConfig-apiurl)
- name: autoTestConfig.encSizeConfig
value: $(autoTestConfig-encSizeConfig)
- name: autoTestConfig.nonAdminUser
value: $(autoTestConfig-nonAdminUser)
steps:
- checkout: self

Expand Down Expand Up @@ -79,7 +81,7 @@ jobs:
displayName: Publish ${{ parameters.TestDescription }} test error media
inputs:
PathtoPublish: '$(System.DefaultWorkingDirectory)/${{ parameters.TestDescription }} test media.zip'
ArtifactName: '${{ parameters.TestDescription }} test output'
ArtifactName: '${{ parameters.TestDescription }} test output $(system.JobId)'

- task: PublishTestResults@2
displayName: Publish ${{ parameters.TestDescription }} test results
Expand Down
3 changes: 2 additions & 1 deletion Helper/ConstantHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ type BatchAttribute = {

export const attributeBusinessUnit: BatchAttribute = { key: 'BusinessUnit', value: 'ADDS' };
export const attributeProductType: BatchAttribute = { key: 'Product Type', value: 'AVCS' };
export const attributeFileName: BatchAttribute = { key: 'File Name', value: 'test' };
export const attributeWeekYear: string = 'Year / Week';
export const attributeFileName: BatchAttribute = { key: 'File Name', value: 'V01X01' };
export const attributeFileSize: BatchAttribute = {key: 'FileSize', value: '1000'};
export const attributeMimeType: BatchAttribute = {key: 'MimeType', value: 'text/plain'};
export const attributeMediaType: BatchAttribute = {key: 'Media Type', value: 'DVD'};
Expand Down
21 changes: 21 additions & 0 deletions NVDSuppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,25 @@
<packageUrl regex="true">^pkg:npm/vite@.*$</packageUrl>
<vulnerabilityName>CVE-2024-31207</vulnerabilityName>
</suppress>
<suppress>
<notes>
<![CDATA[
file name: async:3.2.4
PBI https://dev.azure.com/ukhydro/Abzu/_workitems/edit/164628
]]>
</notes>
<packageUrl regex="true">^pkg:npm/async@.*$</packageUrl>
<vulnerabilityName>CVE-2024-39249</vulnerabilityName>
</suppress>
<suppress>
<notes>
<![CDATA[
file name: ws:various
ws is an open source WebSocket client and server for Node.js. We do not use the server functionality.
]]>
</notes>
<packageUrl regex="true">^pkg:npm/ws@.*$</packageUrl>
<vulnerabilityName>CVE-2024-37890</vulnerabilityName>
<vulnerabilityName>GHSA-3h5v-q93c-6h6q</vulnerabilityName>
</suppress>
</suppressions>
Loading

0 comments on commit b43c4cf

Please sign in to comment.