Skip to content

Conversation

@daewigma
Copy link

Haven't done full testing yet,

@daewigma
Copy link
Author

A couple things to note:

  • Until Jest 27 is released, Env cannot be in TS. Since this gets compiled, it should be fine, but I wrote/tested in JS, then converted to TS, and did a lot of refactoring from my test setup, so it still needs to be tested again.
  • I didn't do a full E2E test of this yet, but I did test the individual parts work as expected:
    • the env can set a global function that the test can pass the attachment path to
    • the test can save into a static property for the class
    • the reporter can access that property
  • I didn't test the updated TRX generation yet

@daewigma daewigma changed the title Support Attachemnts Support Attachements Mar 20, 2021
@daewigma daewigma mentioned this pull request Mar 20, 2021
// TODO: use event.test.startedAt in case of re-reuns
this.testAttachmentMappings[testName][0] = attachmentList;

this.global.saveAttachmentToTrx = (attachmentPath: string) => {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this line do? Where does the saveAttachmentToTrx get called?

testResult.ancestorTitles && testResult.ancestorTitles.length
? `${testResult.ancestorTitles.join(" / ")} / ${testResult.title}`
: testResult.title;
export const getFullTestName = (ancestorTitles: string[], testResultTitle: string): string =>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the single testResult parameter like before? When you call this, you are passing two properties of the testResult so why not pass the whole thing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants