-
Notifications
You must be signed in to change notification settings - Fork 8
Upgrade to basecamp-sdk v0.7.1 — gauges, assignments, notifications, accounts #373
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
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
fb3460a
Bump basecamp-sdk to v0.7.1
jeremy fca9c95
Merge upstream fixes (#363, #364, #365, #367, #369)
jeremy 0be714a
Add gauges command for project progress tracking
jeremy 1eb44bf
Add assignments command for viewing my assignments
jeremy e48a6aa
Add notifications command, extend accounts, register all new commands
jeremy 6c0bca3
Update docs and surface for v0.7.1 commands
jeremy 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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,26 @@ | ||
| #!/usr/bin/env bats | ||
| # smoke_assignments.bats - Level 0: My assignments operations | ||
|
|
||
| load smoke_helper | ||
|
|
||
| setup_file() { | ||
| ensure_token || return 1 | ||
| } | ||
|
|
||
| @test "assignments list returns assignments" { | ||
| run_smoke basecamp assignments list --json | ||
| assert_success | ||
| assert_json_value '.ok' 'true' | ||
| } | ||
|
|
||
| @test "assignments completed returns completed items" { | ||
| run_smoke basecamp assignments completed --json | ||
| assert_success | ||
| assert_json_value '.ok' 'true' | ||
| } | ||
|
|
||
| @test "assignments due returns due items" { | ||
| run_smoke basecamp assignments due overdue --json | ||
| assert_success | ||
| assert_json_value '.ok' 'true' | ||
| } |
This file contains hidden or 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,58 @@ | ||
| #!/usr/bin/env bats | ||
| # smoke_gauges.bats - Level 0: Gauge operations | ||
|
|
||
| load smoke_helper | ||
|
|
||
| setup_file() { | ||
| ensure_token || return 1 | ||
| } | ||
|
|
||
| @test "gauges list returns gauges" { | ||
| run_smoke basecamp gauges list --json | ||
| assert_success | ||
| assert_json_value '.ok' 'true' | ||
| } | ||
|
|
||
| @test "gauges needles requires project" { | ||
| ensure_project || mark_unverifiable "Cannot discover project" | ||
| run_smoke basecamp gauges needles -p "$QA_PROJECT" --json | ||
| # Gauges may not be enabled on the project (403) | ||
| [[ "$status" -eq 4 ]] && mark_unverifiable "Gauges not enabled on project" | ||
| assert_success | ||
| assert_json_value '.ok' 'true' | ||
| } | ||
|
|
||
| @test "gauges needle requires valid ID" { | ||
| run_smoke basecamp gauges needle 999999 --json | ||
| mark_unverifiable "Requires valid needle ID" | ||
| } | ||
|
|
||
| @test "gauges create requires project and position" { | ||
| ensure_project || mark_unverifiable "Cannot discover project" | ||
| run_smoke basecamp gauges create --position 50 -p "$QA_PROJECT" --json | ||
| # May fail if gauges not enabled (403) or other constraint | ||
| [[ "$status" -eq 4 ]] && mark_unverifiable "Gauges not enabled on project" | ||
| mark_unverifiable "Mutating test - gauge creation may not be safe in all environments" | ||
| } | ||
|
|
||
| @test "gauges update requires valid needle ID" { | ||
| run_smoke basecamp gauges update 999999 --description "test" --json | ||
| mark_unverifiable "Requires valid needle ID" | ||
| } | ||
|
|
||
| @test "gauges delete requires valid needle ID" { | ||
| run_smoke basecamp gauges delete 999999 --json | ||
| mark_unverifiable "Requires valid needle ID" | ||
| } | ||
|
|
||
| @test "gauges enable requires project" { | ||
| ensure_project || mark_unverifiable "Cannot discover project" | ||
| run_smoke basecamp gauges enable -p "$QA_PROJECT" --json | ||
| mark_unverifiable "Mutating test - gauge toggle may not be safe in all environments" | ||
| } | ||
|
|
||
| @test "gauges disable requires project" { | ||
| ensure_project || mark_unverifiable "Cannot discover project" | ||
| run_smoke basecamp gauges disable -p "$QA_PROJECT" --json | ||
| mark_unverifiable "Mutating test - gauge toggle may not be safe in all environments" | ||
| } |
This file contains hidden or 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,20 @@ | ||
| #!/usr/bin/env bats | ||
| # smoke_notifications.bats - Level 0: Notification operations | ||
|
|
||
| load smoke_helper | ||
|
|
||
| setup_file() { | ||
| ensure_token || return 1 | ||
| } | ||
|
|
||
| @test "notifications list returns notifications" { | ||
| run_smoke basecamp notifications list --json | ||
| assert_success | ||
| assert_json_value '.ok' 'true' | ||
| } | ||
jeremy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| @test "notifications read rejects unknown ID" { | ||
| run_smoke basecamp notifications read 999999 --json | ||
| assert_failure | ||
| assert_output_contains "not found" | ||
jeremy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
This file contains hidden or 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 hidden or 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 hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.