-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[No QA][TS migration] Migrate workflow_tests assertions to TypeScript #38664
[No QA][TS migration] Migrate workflow_tests assertions to TypeScript #38664
Conversation
// eslint-disable-next-line import/prefer-default-export | ||
export {assertVerifySignedCommitsJobExecuted}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some of the files in this directory are pre-generated, so to keep the interface uniform I'd rather keep it this way instead of differentiating between export default
and export {...}
}; | ||
|
||
const assertionsExportsTemplate = (jobAssertions: string[]): string => { | ||
const assertionsString = jobAssertions.map((assertion) => ` ${assertion}: ${assertion}`).join(',\n'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain reasoning behind this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was doubling the names in exports, which resulted in errors inside the generated files. Added comment
PR Author checklist is failing, you need to click on one more checkbox @BrtqKr |
const steps = [ | ||
createStepAssertion('Checkout', true, null, 'CHECKLIST', 'Checkout'), | ||
createStepAssertion('authorChecklist.ts', true, null, 'CHECKLIST', 'Running authorChecklist.ts', [{key: 'GITHUB_TOKEN', value: '***'}], []), | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
]; | |
] as const; |
}; | ||
const assertCreateNewVersionJobExecuted = (workflowResult, semverLevel = 'BUILD', didExecute = true, isSuccessful = true) => { | ||
} | ||
function assertCreateNewVersionJobExecuted(workflowResult: Step[], semverLevel = 'BUILD', didExecute = true, isSuccessful = true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function assertCreateNewVersionJobExecuted(workflowResult: Step[], semverLevel = 'BUILD', didExecute = true, isSuccessful = true) { | |
function assertCreateNewVersionJobExecuted(workflowResult: Step[], semverLevel = 'BUILD', didExecute = true, isSuccessful = true) { |
@@ -87,7 +81,7 @@ describe('test workflow ${workflowName}', () => { | |||
}; | |||
const result = await act | |||
.runEvent('[EVENT]', { | |||
workflowFile: path.join(repoPath, '.github', 'workflows'), | |||
workflowFile: path.join(repoPath, '.github', 'workflows', '${workflowName}.yml'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because otherwise, it was generating a template that wouldn't work from the beginning. This script has been created as a helper for creating new workflow templates, but wasn't well maintained, I've adjusted this to the typescript, with a couple of improvements.
Also @BrtqKr let's change the PR title to |
@jjcoffee kind bump 🙂 |
Also @BrtqKr we got conflicts here |
@fabioh8010 Waiting for this to come out of draft 🙏 |
@jjcoffee sorry for turning it back into a draft, but some of the tests stopped working after merging main, now it should be fine 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blindly approving.
We did not find an internal engineer to review this PR, trying to assign a random engineer to #32060 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Details
Fixed Issues
$ #32060
PROPOSAL:
Tests
npm run workflow-test
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop