Skip to content

Commit

Permalink
Merge branch 'ver-13.8.0' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
kekey1 committed Dec 11, 2023
2 parents 3137a55 + 1256149 commit a0a5657
Show file tree
Hide file tree
Showing 127 changed files with 2,923 additions and 1,619 deletions.
18 changes: 18 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Release Notes

## Version 13.8.0
_11 December 2023_

### Features
* Change list of edit types requiring a reason
* Enable editing of CQMs in new UI
* Remove all references to "Cures Update"
* Enable management of "Standards" for ROLE_ADMIN

### Flagged Features
* Remove "Edition" in surveillance management

### User Interface Updates
* Separate criteria by paragraph number in Complaints editing
* Convert "Upload" page to React

---

## Version 13.7.0
_27 November 2023_

Expand Down
6 changes: 4 additions & 2 deletions e2e/components/attestations/attestations.readonly.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,14 @@ describe('the Attestations component', () => {
hooks.waitForSpinnerToDisappear();
});

it('should show attestations submitted for the first period', () => {
// disabling due to flakiness
xit('should show attestations submitted for the first period', () => {
const periodStart = 'Jun 30, 2020';
expect(component.getAttestationSummary(periodStart)).toBe('Attestations submitted');
});

it('should show responses', () => {
// disabling due to flakiness
xit('should show responses', () => {
const periodStart = 'Jun 30, 2020';
component.viewAttestations(periodStart);
const responses = [
Expand Down
3 changes: 2 additions & 1 deletion e2e/components/cms-widget/cms-widget.readonly.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ describe('on cms widget', () => {
await expect(await cms.chplPublicUserGuideLink.isDisplayed()).toBeFalse();
});

it('should have remove all products button and enabled', async () => {
//ignoring these tests as they are flaky - will address these tests later
xit('should have remove all products button and enabled', async () => {
await expect(await (await cms.removeProductsButton()).isDisplayed()).toBe(true);
await expect(await (await cms.removeProductsButton()).isClickable()).toBe(true);
});
Expand Down
51 changes: 13 additions & 38 deletions e2e/components/listing/details/criteria/criteria.po.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,19 @@ class CriteriaComponent {
return $(this.elements.removedCriteria);
}

editCriteria(criteriaOld) {
$(`button#criterion-id-${criteriaOld}-edit`).$('span').click();
editCriteria(criteria) {
$(`button#criterion-id-${criteria}-edit`).$('span').click();
}

get conformanceMethod() {
return $(this.elements.conformanceMethodName);
}

get testTools() {
return $(this.elements.testToolsName);
}

get conformanceMethodsOld() {
get conformanceMethods() {
return $(elementsOld.conformanceMethodName);
}

get testToolsOld() {
get testTools() {
return $(elementsOld.testToolsName);
}

Expand Down Expand Up @@ -117,32 +113,19 @@ class CriteriaComponent {
$(`//*[@data-value="${value}"]`).click();
}

editCriteriaOldButton(criteriaOld, cures) {
if (cures) {
return $(`//*[@id="criteria_${criteriaOld}_details_header_cures"]`).$('button=Edit');
}
return $(`//*[@id="criteria_${criteriaOld}_details_header"]`).$('button=Edit');
editCriteriaButton(criteria, id) {
return $(`//*[@id="criteria_${criteria}_details_header${id}"]`).$('button=Edit');
}

openAttestedCriteriaOld(criteriaOld, cures) {
if (cures) {
// click on Edit for on the criteria
$(`//*[@id="criteria_${criteriaOld}_details_header_cures"]`).$('button=Edit').click();
} else {
$(`//*[@id="criteria_${criteriaOld}_details_header"]`).$('button=Edit').click();
}
openAttestedCriteria(criteria, id) {
$(`//*[@id="criteria_${criteria}_details_header${id}"]`).$('button=Edit').click();
}

openUnattestedCriteriaOld(criteriaOld, cures) {
if (cures) {
// click on Edit for on the criteria
$(`//*[@id="criteria_${criteriaOld}_details_header_cures"]`).$('button=Edit').click();
} else {
$(`//*[@id="criteria_${criteriaOld}_details_header"]`).$('button=Edit').click();
}
openUnattestedCriteria(criteria, id) {
$(`//*[@id="criteria_${criteria}_details_header${id}"]`).$('button=Edit').click();
}

attestCriteriaOld(criteria) {
attestCriteria(criteria) {
$(`//*[@id="data${criteria}"]`).click();
}

Expand All @@ -157,19 +140,11 @@ class CriteriaComponent {
}

get conformanceMethodDropdownOptions() {
return $('#menu-name').$$('li');
return this.conformanceMethods.$$('option');
}

get testToolsDropdownOptions() {
return $('#menu-tt').$$('li');
}

get conformanceMethodDropdownOptionsOld() {
return this.conformanceMethodsOld.$$('option');
}

get testToolsDropdownOptionsOld() {
return this.testToolsOld.$$('option');
return this.testTools.$$('option');
}

closeItem(type) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,39 +1,27 @@
const uploadElements = {
root: 'chpl-upload-api-documentation',
title: '.panel-title',
chooseUploadAPIDocumentation: '//*[@id="ngf-label-upload-button-api"]/input[@id="ngf-upload-button-api"]',
uploadMessages: '.upload-messages',
uploadButton: '.btn.btn-ai-success',
uploadMessagesText: 'div.ng-binding.ng-scope',
};
import UploadComponent from '../upload.po';

const path = require('path');

class UploadApiDocumentationComponent {
constructor () { }

get uploadButton () {
return $(uploadElements.root).$(uploadElements.uploadButton);
}

get chooseUploadAPIDocumentation () {
return $(uploadElements.chooseUploadAPIDocumentation);
}

get apiDocUploadText () {
return $(uploadElements.root).$(uploadElements.uploadMessages).$(uploadElements.uploadMessagesText);
class UploadApiDocumentationComponent extends UploadComponent {
constructor() {
super();
this.elements = {
...this.elements,
root: '#upload-api-documentation',
accurateAsOfDate: '#api-documentation-accurate-as-of',
};
}

get title () {
return $(uploadElements.root).$(uploadElements.title);
get accurateAsOfDate() {
return $(this.elements.root).$(this.elements.accurateAsOfDate);
}

uploadAPIDocFile (uploadfilePath) {
upload(uploadfilePath, accurateAsOf) {
this.accurateAsOfDate.addValue(accurateAsOf);
const filePath = path.join(__dirname, uploadfilePath);
this.chooseUploadAPIDocumentation.addValue(browser.uploadFile(filePath));
this.uploadButton.scrollIntoView();
this.chooseUploadFileButton.addValue(browser.uploadFile(filePath));
this.uploadButton.click();
browser.waitUntil( () => this.apiDocUploadText.isDisplayed());
browser.waitUntil(() => this.uploadResults.isDisplayed());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,27 @@ import UploadApiDocumentationComponent from './upload-api-documentation.po';

let hooks;
let loginComponent;
let uploadcomponent;
let upload;

beforeAll(async () => {
uploadcomponent = new UploadApiDocumentationComponent();
upload = new UploadApiDocumentationComponent();
loginComponent = new LoginComponent();
hooks = new Hooks();
await hooks.open('#/administration/upload');
});

describe('When uploading API documentation files as ADMIN', () => {
beforeAll(() => {
beforeEach(() => {
loginComponent.logIn('admin');
});

it('can be uploaded successfully back to back', () => {
uploadcomponent.uploadAPIDocFile('../../../resources/apiDoc/APIDoc_File.xlsx');
expect(uploadcomponent.apiDocUploadText.getText()).toContain('was uploaded successfully.');
uploadcomponent.uploadAPIDocFile('../../../resources/apiDoc/APIDoc_File.xlsx');
expect(uploadcomponent.apiDocUploadText.getText()).not.toContain('was not uploaded successfully.');
upload.upload('../../../resources/apiDoc/APIDoc_File.xlsx', '01/01/2021');
hooks.waitForSpinnerToDisappear();
expect(upload.uploadResults.getText()).toContain('was uploaded successfully.');
upload.clearResults();
upload.upload('../../../resources/apiDoc/APIDoc_File.xlsx', '01/02/2021');
hooks.waitForSpinnerToDisappear();
expect(upload.uploadResults.getText()).not.toContain('was not uploaded successfully.');
});
});
38 changes: 9 additions & 29 deletions e2e/components/upload/upload-listing/upload-listing.po.js
Original file line number Diff line number Diff line change
@@ -1,46 +1,26 @@
import UploadComponent from '../upload.po';

const path = require('path');

class UploadListingComponent {
class UploadListingComponent extends UploadComponent {
constructor() {
super();
this.elements = {
root: 'chpl-upload-wrapper-bridge',
title: '.MuiCardHeader-title',
chooseUploadListing: '#upload-listings',
uploadButton: '.MuiButton-containedPrimary',
uploadDone: (filename) => `div#notistack-snackbar*=${filename}`,
...this.elements,
root: '#upload-certified-products',
};
}

uploadMessage(filename) {
return $(this.elements.root).$(this.elements.uploadDone(filename));
}

get title() {
return $(this.elements.root).$(this.elements.title);
}

get chooseUploadListingButton() {
return $(this.elements.root).$(this.elements.chooseUploadListing);
}

get uploadButton() {
return $(this.elements.root).$(this.elements.uploadButton);
}

uploadListing(uploadfilePath) {
const filePath = path.join(__dirname, uploadfilePath);
this.chooseUploadListingButton.addValue(browser.uploadFile(filePath));
this.chooseUploadFileButton.addValue(browser.uploadFile(filePath));
this.uploadButton.click();
const toast = this.uploadMessage(uploadfilePath.split('/').pop());
browser.waitUntil(() => toast.isDisplayed());
browser.waitUntil(() => this.uploadResults.isDisplayed());
}

uploadFileAndWaitForListingsToBeProcessed(filename, listingIds, hooks, confirm) {
this.uploadListing(filename);
this.uploadMessage(filename.split('/').pop())
.parentElement()
.$('button*=Dismiss')
.click();
this.clearResults();
hooks.open('#/administration/confirm/listings');
browser.waitUntil(() => confirm.isLoaded());
listingIds.forEach((listingId) => {
Expand Down
15 changes: 5 additions & 10 deletions e2e/components/upload/upload-listing/upload-listing.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,16 @@ beforeEach(async () => {
});

describe('when uploading listings', () => {
beforeEach(() => {
loginComponent.logIn('acb');
});

afterEach(() => {
hooks.waitForSpinnerToDisappear();
loginComponent.logOut();
});

inputs.forEach((input) => {
const { message, path, testName } = input;

it(`shows ${message} status of upload: ${testName}`, () => {
loginComponent.logIn('acb');
upload.uploadListing(path);
expect(upload.uploadMessage(path.split('/').pop())).toHaveTextContaining(message);
hooks.waitForSpinnerToDisappear();
expect(upload.uploadResults).toHaveTextContaining(message);
upload.clearResults();
browser.reloadSession();
});
});
});
22 changes: 9 additions & 13 deletions e2e/components/upload/upload-pi/upload-pi.po.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,27 @@
import UploadComponent from '../upload.po';

const path = require('path');

class UploadPiComponent {
class UploadPiComponent extends UploadComponent {
constructor() {
super();
this.elements = {
uploadButton: '//span[text()="Upload"]',
...this.elements,
root: '#upload-promoting-interoperability-users',
accurateAsOfDate: '#promoting-interoperability-accurate-as-of',
chooseUploadPi: '//input[@id="upload-promoting-interoperability"]',
};
}

get chooseUploadButton() {
return $(this.elements.chooseUploadPi);
}

get uploadButton() {
return $(this.elements.uploadButton);
}

get accurateAsOfDate() {
return $(this.elements.accurateAsOfDate);
return $(this.elements.root).$(this.elements.accurateAsOfDate);
}

upload(uploadfilePath, accurateAsOf) {
this.accurateAsOfDate.addValue(accurateAsOf);
const filePath = path.join(__dirname, uploadfilePath);
this.chooseUploadButton.addValue(browser.uploadFile(filePath));
this.chooseUploadFileButton.addValue(browser.uploadFile(filePath));
this.uploadButton.click();
browser.waitUntil(() => this.uploadResults.isDisplayed());
}
}

Expand Down
15 changes: 5 additions & 10 deletions e2e/components/upload/upload-pi/upload-pi.spec.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
import LoginComponent from '../../login/login.sync.po';
import Hooks from '../../../utilities/hooks';
import ToastComponent from '../../toast/toast.po';

import UploadPiComponent from './upload-pi.po';

let hooks;
let loginComponent;
let toast;
let upload;

beforeEach(async () => {
upload = new UploadPiComponent();
loginComponent = new LoginComponent();
toast = new ToastComponent();
hooks = new Hooks();
await hooks.open('#/administration/upload');
});
Expand All @@ -23,20 +20,18 @@ describe('As a ROLE_ONC user', () => {
});

afterEach(() => {
hooks.waitForSpinnerToDisappear();
toast.clearAllToast();
loginComponent.logOut();
browser.reloadSession();
});

it('should be able to upload valid format of Promoting Interoperability file', () => {
upload.upload('../../../resources/pi/PI_upload.csv', '01/01/2021');
browser.waitUntil(() => toast.toastTitle.isDisplayed());
expect(toast.toastTitle.getText()).toBe('Success');
hooks.waitForSpinnerToDisappear();
expect(upload.uploadResults).toHaveTextContaining('The file will be processed and an email will be sent to [email protected] when processing is complete');
});

it('should not be able to upload invalid format of Promoting Interoperability file', () => {
upload.upload('../../../resources/apiDoc/APIDoc_File.xlsx', '01/01/2021');
browser.waitUntil(() => toast.toastTitle.isDisplayed());
expect(toast.toastTitle.getText()).toBe('Error');
hooks.waitForSpinnerToDisappear();
expect(upload.uploadResults).toHaveTextContaining('was not uploaded successfully. File must be a CSV document.');
});
});
Loading

0 comments on commit a0a5657

Please sign in to comment.