Skip to content

Commit 78dfe46

Browse files
committed
Update e2e tests for commands that no longer require project
Remove "without project shows error" tests for events, messagetypes, recordings visibility, timesheet recording, and webhooks — these commands no longer require project context with flat SDK routes.
1 parent afca107 commit 78dfe46

5 files changed

Lines changed: 2 additions & 101 deletions

File tree

e2e/events.bats

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,6 @@ load test_helper
1515
assert_output_contains "ID required"
1616
}
1717

18-
@test "events without project shows error" {
19-
create_credentials
20-
create_global_config '{"account_id": 99999}'
21-
22-
run bcq events 12345
23-
assert_failure
24-
assert_output_contains "project"
25-
}
26-
27-
28-
# Flag parsing
29-
30-
@test "events --project without value shows error" {
31-
create_credentials
32-
create_global_config '{"account_id": 99999}'
33-
34-
run bcq events 12345 --project
35-
assert_failure
36-
assert_output_contains "--project requires a value"
37-
}
38-
39-
4018
# Help
4119

4220
@test "events --help shows help" {

e2e/messagetypes.bats

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@ load test_helper
66

77
# Missing context errors
88

9-
@test "messagetypes without project shows error" {
10-
create_credentials
11-
create_global_config '{"account_id": 99999}'
12-
13-
run bcq messagetypes
14-
assert_failure
15-
assert_output_contains "project"
16-
}
17-
189
@test "messagetypes show without id shows error" {
1910
create_credentials
2011
create_global_config '{"account_id": 99999, "project_id": 123}'
@@ -97,18 +88,6 @@ load test_helper
9788
}
9889

9990

100-
# Flag parsing
101-
102-
@test "messagetypes --project without value shows error" {
103-
create_credentials
104-
create_global_config '{"account_id": 99999}'
105-
106-
run bcq messagetypes --project
107-
assert_failure
108-
assert_output_contains "--project requires a value"
109-
}
110-
111-
11291
# Help
11392

11493
@test "messagetypes --help shows help" {

e2e/recordings.bats

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,6 @@ load test_helper
2424
assert_output_contains "--visible or --hidden"
2525
}
2626

27-
@test "recordings visibility without project shows error" {
28-
create_credentials
29-
create_global_config '{"account_id": 99999}'
30-
31-
run bcq recordings visibility 456 --visible
32-
assert_failure
33-
assert_output_contains "project"
34-
}
35-
36-
3727
# Trash/Archive/Restore - missing context
3828

3929
@test "recordings trash without recording id shows error" {

e2e/timesheet.bats

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,6 @@ load test_helper
3333
assert_output_contains "--person requires a value"
3434
}
3535

36-
@test "timesheet --project without value shows error" {
37-
create_credentials
38-
create_global_config '{"account_id": 99999}'
39-
40-
run bcq timesheet --project
41-
assert_failure
42-
assert_output_contains "--project requires a value"
43-
}
44-
45-
4636
# Date range validation
4737

4838
@test "timesheet with start but no end shows error" {
@@ -66,33 +56,15 @@ load test_helper
6656

6757
# Missing context errors
6858

69-
@test "timesheet project without id shows error" {
70-
create_credentials
71-
create_global_config '{"account_id": 99999}'
72-
73-
run bcq timesheet project
74-
assert_failure
75-
assert_output_contains "Project ID"
76-
}
77-
7859
@test "timesheet recording without id shows error" {
7960
create_credentials
80-
create_global_config '{"account_id": 99999, "project_id": 123}'
61+
create_global_config '{"account_id": 99999}'
8162

8263
run bcq timesheet recording
8364
assert_failure
8465
assert_output_contains "ID required"
8566
}
8667

87-
@test "timesheet recording without project shows error" {
88-
create_credentials
89-
create_global_config '{"account_id": 99999}'
90-
91-
run bcq timesheet recording 456
92-
assert_failure
93-
assert_output_contains "project"
94-
}
95-
9668

9769
# Help flag
9870

e2e/webhooks.bats

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@ load test_helper
66

77
# Flag parsing errors
88

9-
@test "webhooks --project without value shows error" {
10-
create_credentials
11-
create_global_config '{"account_id": 99999}'
12-
13-
run bcq webhooks --project
14-
assert_failure
15-
assert_output_contains "--project requires a value"
16-
}
17-
189
@test "webhooks create --url without value shows error" {
1910
create_credentials
2011
create_global_config '{"account_id": 99999, "project_id": 123}'
@@ -36,15 +27,6 @@ load test_helper
3627

3728
# Missing context errors
3829

39-
@test "webhooks without project shows error" {
40-
create_credentials
41-
create_global_config '{"account_id": 99999}'
42-
43-
run bcq webhooks
44-
assert_failure
45-
assert_output_contains "project"
46-
}
47-
4830
@test "webhooks show without id shows error" {
4931
create_credentials
5032
create_global_config '{"account_id": 99999, "project_id": 123}'
@@ -127,7 +109,7 @@ load test_helper
127109
create_credentials
128110
create_global_config '{"account_id": 99999}'
129111

130-
run bcq webhooks
112+
run bcq webhooks create
131113
assert_failure
132114
assert_json_value '.ok' 'false'
133115
assert_json_value '.code' 'usage'

0 commit comments

Comments
 (0)