-
Notifications
You must be signed in to change notification settings - Fork 3k
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, adjust utils migration #38363
[No QA][TS migration] Migrate workflow_tests, adjust utils migration #38363
Conversation
…ation/32051-23055-tests
…ation/32051-23055-tests
workflow_tests/lint.test.ts
Outdated
try { | ||
const result = await act.runEvent(event, { | ||
workflowFile: path.join(repoPath, '.github', 'workflows', 'lint.yml'), | ||
mockSteps: testMockSteps, | ||
actor, | ||
logFile: utils.getLogFilePath('lint', expect.getState().currentTestName), | ||
}); | ||
|
||
assertions.assertLintJobExecuted(result); | ||
} catch (error) { | ||
console.error(error); | ||
} |
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 do we suppress the error here?
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.
same
workflow_tests/lint.test.ts
Outdated
try { | ||
const result = await act.runEvent(event, { | ||
workflowFile: path.join(repoPath, '.github', 'workflows', 'lint.yml'), | ||
mockSteps: testMockSteps, | ||
actor: testActor, | ||
logFile: utils.getLogFilePath('lint', expect.getState().currentTestName), | ||
}); | ||
|
||
assertions.assertLintJobExecuted(result); | ||
} catch (error) { | ||
console.error(error); | ||
} |
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.
Same
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.
same
workflow_tests/lint.test.ts
Outdated
try { | ||
const result = await act.runEvent(event, { | ||
workflowFile: path.join(repoPath, '.github', 'workflows', 'lint.yml'), | ||
mockSteps: testMockSteps, | ||
actor, | ||
logFile: utils.getLogFilePath('lint', expect.getState().currentTestName), | ||
}); | ||
|
||
assertions.assertLintJobExecuted(result); | ||
} catch (error) { | ||
console.error(error); | ||
} |
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.
Same
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.
I remember having some errors pop up in there, but apparently I've handled them along the way. I'll get rid of it
declare module '@kie/act-js' { | ||
// eslint-disable-next-line rulesdir/no-inline-named-export | ||
export declare type StepIdentifier = { | ||
id?: string; | ||
name: string; | ||
run?: string; | ||
mockWith?: string; | ||
with?: string; | ||
envs?: string[]; | ||
inputs?: string[]; | ||
} & Omit<ActStepIdentifier, 'name' | 'id' | 'run' | 'mockWith'>; | ||
} |
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 is this change necessary?
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 steps are passing additional data and since StepIdentifier
is defined under the hood as
export declare type StepIdentifier = StepIdentifierUsingName | StepIdentifierUsingId | StepIdentifierUsingUses | StepIdentifierUsingRun | StepIdentifierUsingIndex | StepIdentifierUsingBefore | StepIdentifierUsingAfter;
those steps had more restrictive subtypes of StepIdentifier
assigned to them, so to avoid changing the content I made the type a tiny bit more general on the module level
@@ -71,7 +72,7 @@ describe('test workflow finishReleaseCycle', () => { | |||
updateProduction: mocks.FINISHRELEASECYCLE__UPDATEPRODUCTION__STEP_MOCKS, | |||
updateStaging: mocks.FINISHRELEASECYCLE__UPDATESTAGING__STEP_MOCKS, | |||
}; | |||
const testMockJobs = { | |||
const testMockJobs: Record<string, MockJob> = { |
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.
const testMockJobs: Record<string, MockJob> = { | |
const testMockJobs: MockJobs = { |
No C+ needed here and Reassure is unrelated / has been fixed on main. Not going to block - going to merge this. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
@roryabraham looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
not an emergency - reassure is unrelated |
This is causing TS to fail on main, going to revert for now. Not sure why it was passing on the PR but not after merge. Revert PR here: #38857 |
@roryabraham looks like it's because #38288 was merged AFTER the last commit was added on this PR, and BEFORE this PR was merged 🤷 |
New PR being worked on here -> #38934 |
Details
Fixed Issues
$ #32051
$ #32052
$ #32053
$ #32054
$ #32055
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