CCM-16489: Add letter authoring e2e tests#930
Conversation
bcfb235 to
5de6a57
Compare
5cb1262 to
5a8a9d4
Compare
5a8a9d4 to
aa1ec8e
Compare
|
|
||
| const compareSrc = (a: string | null, b: string | null) => { | ||
| if (!a || !b) { | ||
| throw new Error('123'); |
There was a problem hiding this comment.
just spotted this as well, so silly 🤦 woops!
| expect(path.basename(a)).not.toEqual(path.basename(b)); | ||
| }; | ||
|
|
||
| let updatedShortRenderSrc: string; |
There was a problem hiding this comment.
you can return values from test.step, rather than mutating these, if you prefer
There was a problem hiding this comment.
yes! totally forgot about that. Already did this with the template key last week but can also be done here
| return; | ||
| } | ||
|
|
||
| await this.languageInput.selectOption(input.language); |
There was a problem hiding this comment.
could this whole implementation go in TemplateMgmtUploadLetterBasePage? only difference is that the other ones don't have the language check, but this version handles the language being absent just fine
There was a problem hiding this comment.
i think so, I will try and dedupe it
There was a problem hiding this comment.
ah wait, now I remember why i hesitated to do this. It would mean moving all of the references to the elements up into the base page class. When you do that you pretty much remove the need for template-mgmt-upload-standard-english-letter-template-page.ts, template-mgmt-upload-large-print-letter-template-page.ts and template-mgmt-upload-bsl-letter-template-page.ts which would then mean going and changing all those references and then the PR becomes a lot bigger. Happy to go through and do this but felt like light touch was simpler despite some duplication of code
There was a problem hiding this comment.
i don't think you'd need to change all the references in the tests, if you move everything shared up into the base class then won't the individual pages inherit them?
i'm not sure there's any reason to have a shared base class if you're not going to put all the shared attributes in it. the individual pages still have different URLs so you'd still have the individual classes.
not a big deal so happy to approve regardless but i don't see how moving all the shared attributes up would have any effect outside of these page classes
Description
for each letter type
templateStorageHelper. (Saw this in the existing pdf-letter e2e tests)One test covers off invalid template scenario (missing address).
Added arabic and large print letters.
Tests succeeding locally:

Context
Type of changes
Checklist
Sensitive Information Declaration
To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.
Description
Raising draft to check CI pipeline status
for each letter type
templateStorageHelper. (Saw this in the existing pdf-letter e2e tests)Context
Type of changes
Checklist
Sensitive Information Declaration
To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.