-
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
Merged
aldo-expensify
merged 16 commits into
Expensify:main
from
software-mansion-labs:ts-migration/assertions
Mar 26, 2024
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
a7476c8
migrate assertions files
BrtqKr e98489b
generate wip
BrtqKr e00085b
Merge remote-tracking branch 'origin/ts-migration/utils' into ts-migr…
BrtqKr 8279d23
fix preGenerate wip
BrtqKr dde9a7b
fix preGenerate
BrtqKr 2b2cc72
fix route for github actions file
BrtqKr 1382516
remove logs
BrtqKr d16f27a
adjust templates for pre-generate
BrtqKr aaef6b9
Merge remote-tracking branch 'origin/main' into ts-migration/assertions
BrtqKr 0d8f38f
add comment
BrtqKr 37ecc9d
review fixes
BrtqKr c8f8b42
Merge remote-tracking branch 'origin/main' into ts-migration/assertions
BrtqKr 2f2f545
Merge remote-tracking branch 'origin/main' into ts-migration/assertions
BrtqKr d324829
fix ts
BrtqKr e7eb08b
fix tests
BrtqKr 431dc3f
Merge remote-tracking branch 'origin/main' into ts-migration/assertions
BrtqKr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type {Step} from '@kie/act-js'; | ||
import {createStepAssertion} from '../utils/utils'; | ||
|
||
function assertChecklistJobExecuted(workflowResult: Step[], didExecute = true) { | ||
const steps = [ | ||
createStepAssertion('Checkout', true, null, 'CHECKLIST', 'Checkout'), | ||
createStepAssertion('authorChecklist.ts', true, null, 'CHECKLIST', 'Running authorChecklist.ts', [{key: 'GITHUB_TOKEN', value: '***'}], []), | ||
] as const; | ||
|
||
steps.forEach((expectedStep) => { | ||
if (didExecute) { | ||
expect(workflowResult).toEqual(expect.arrayContaining([expectedStep])); | ||
} else { | ||
expect(workflowResult).not.toEqual(expect.arrayContaining([expectedStep])); | ||
} | ||
}); | ||
} | ||
|
||
export default {assertChecklistJobExecuted}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.