Repository navigation
COG-1144: W0 smoke suite for appointment create/list/confirm - #108
Open
Conversation
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Comment on lines
+65
to
+70
| public void createsAppointmentFromThymeleafForm() throws Exception { | ||
| mockMvc.perform(post("/appointment/create") | ||
| .param("dateString", "2016-10-21 15:25") | ||
| .param("location", "Boston") | ||
| .param("description", "Smoke test appointment") | ||
| .with(user(USERNAME).roles("USER"))) |
There was a problem hiding this comment.
There was a problem hiding this comment.
Intentional — COG-1144 asks for server-side smoke coverage of the controller's date parsing. The picker format is pinned by sending exactly what main.js emits; client-side submission is out of scope here.
Comment on lines
+102
to
+104
| mockMvc.perform(get("/api/appointment/all").with(user("admin").roles("ADMIN"))) | ||
| .andExpect(status().isOk()) | ||
| .andExpect(jsonPath("$[?(@.id == " + appointment.getId() + ")].location").value("New York")); |
There was a problem hiding this comment.
There was a problem hiding this comment.
Deliberate: these tests are the migration regression contract for the appointment endpoints, so they assert route/verb/role behaviour, not admin account provisioning. A DB-backed admin login belongs in a separate auth smoke test.
This was referenced Sep 30, 2026
Open
…shared Testcontainers harness Co-Authored-By: patrick.bradley <patrick.bradley@cognition.ai>
devin-ai-integration
Bot
force-pushed
the
devin/cog-1144-w0-smoke-suite-appointment-create-and-confirm
branch
from
September 30, 2026 16:27
ca07a9c to
90a5636
Compare
devin-ai-integration
Bot
changed the base branch from
master
to
devin/cog-1141-w0-testcontainers-mysql-harness-for-springboottest-boot-154
September 30, 2026 16:27
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Smoke tests for the appointment endpoints, part of the Boot 1.5.4 → 4.1 migration (COG-1144). Stacked on #335 (COG-1141 Testcontainers harness). This PR targets that branch so the diff contains only this ticket's test. It will be retargeted to
masteronce #335 merges.Rebased onto the canonical harness. The PR's own copies of
AbstractIntegrationTest, theUserFrontApplicationTestschange and the pom test dependencies (Testcontainers 1.20.6, spring-security-test) are dropped. The only file left isAppointmentSmokeTest extends AbstractIntegrationTest, which uses the inheritedmockMvc. No production code changes.Coverage is unchanged (all 4 tests pass against today's 1.5.4 behaviour):
/appointment/createusing the datetime-picker format, with the lenientSimpleDateFormat("yyyy-MM-dd hh:mm")results pinned:/api/appointment/allasROLE_ADMIN/api/appointment/{id}/confirmasROLE_ADMIN→ 200. The request lives in a singleconfirm(id)helper. When COG-1153: AppointmentResource.confirm → POST (server + AdminPortal caller) #336 (COG-1153, confirm → POST) lands, whichever of the two PRs merges second changes that helper and the expected status.Test data is kept separate from the sibling smoke suites. The user is now
apptsmoke-user/apptsmoke-user@[REDACTED SECRET].com; before, it was thesmokeuserthat #109 also creates.latestAppointment()also only looks at this user's appointments. The known static account-number counter bug (COG-1179) never fires here: the user is created once throughUserService.createUseragainst a new per-JVM container, and no account rows are inserted directly.Verification (Temurin 1.8.0_504, Docker 29.7.2)
mvn -B -f UserFront/pom.xml clean verify, this branch only:Same command with the sibling suites copied in locally and not committed (
AuthSmokeTestfrom COG-1142,MoneyMovementSmokeTestfrom COG-1143), all in one JVM:Devin-Org: engineering
Link to Devin session: https://app.devin.ai/sessions/3458130a8d5d4e9b996031fa9ec32800
Open in Devin Desktop: https://app.devin.ai/desktop/session/3458130a8d5d4e9b996031fa9ec32800?variant=devin
Requested by: @patrickbradley-cog
Devin Review