-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-draft-workflow.ts
More file actions
32 lines (27 loc) · 982 Bytes
/
test-draft-workflow.ts
File metadata and controls
32 lines (27 loc) · 982 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
* Test file for Draft -> Ready PR workflow validation
* This file tests scenario 2: Draft PR creation and conversion
*/
export function testDraftToReadyWorkflow() {
console.log('Testing Draft -> Ready PR workflow');
// Scenario 2 Test Steps:
// 1. Create this PR as DRAFT
// 2. Verify NO review is triggered
// 3. Convert to "Ready for review"
// 4. Verify review is triggered ONCE
const testSteps = {
step1: 'Create PR as draft - Expected: No review',
step2: 'Wait for Actions tab confirmation',
step3: 'Click "Ready for review" button',
step4: 'Verify single review triggered',
};
return {
scenario: 'Draft to Ready Conversion',
expectedBehavior: 'Review should trigger only on ready_for_review event',
testSteps,
};
}
// Expected GitHub Actions behavior:
// - Draft creation (opened event): Skipped by if condition
// - Ready conversion (ready_for_review event): Review triggered
// - No duplicate reviews should occur