-
Notifications
You must be signed in to change notification settings - Fork 2
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
test(app): updated specs to fit with new API #587
Merged
Merged
Conversation
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
seaerchin
requested review from
dcshzj,
alexanderleegs,
prestonlimlianjie and
kishore03109
December 9, 2022 07:02
seaerchin
force-pushed
the
test/buttons
branch
from
December 9, 2022 07:04
a2f64c7
to
181ff8d
Compare
kishore03109
suggested changes
Dec 12, 2022
kishore03109
approved these changes
Dec 12, 2022
seaerchin
added a commit
that referenced
this pull request
Apr 10, 2023
* feat(reviewrequestservice): add initial impl to copute url * chore(errors): add many errors * feat(types): add types * refactor(deployment): chaneg string type to permalink * feat(pageservice): add new pageservice abstration for raw js wrappers * feat(json): add new safeJsonParse util * refactor(reviewrequestservice): refactor to use new page service * refactor(sitesservice): refactor to use new page service * refactor(review): refactor for neverthrow api * chore(server): init page service * chore(pageservice): add comment * fix(reviewrequestservice): add in await * fix(collaboratorsservice): add in unwrap * chore(review.ts): removed vapt fixes * chore(services/types): renamed variables and methods for clarity * chore(errors): removed unneeded properties * fix(server): u9pdate after rebase * fix(review): update after rebase * fix(rebase fixes): add cast cos the `permalink` property is guaranteed but it's opaque atm * chore(server): add code for init of pageservice * chore(rr service): specify return types * fix(notif handler): update to fit new api * test(app): updated specs to fit with new API (#587) * fix(sites.spec): update imports * test(sitesservice): update types * test(reviewrequestservice.spec): update spce * test(collaboratorsservice): fixed tests * chore(databaseerror): add new error * fix(sitesservice): fixed regression in code * test(sitesservice.spec): fixed tests * chore(sitesservice): remove extra console log * chore(sites/user spec): add sync to prevent db clash * chore(databaseerror): removed extra properties * chore(constants): add new constant for homepage name * fix(pageservice): fixed bug allowing empty collections * chore(constants): add new constant for contact-us * refactor(pages): rename property * test(pageservice.spec): add tests * chore(constants): rename homepage constants for consistency * chore(pageservice): remove redundant code * chore(pageservice.spec,): remove extra async * chore(pageservice.spec): standardise imports \ * refactor(pageservice): update parsecolletionpage * test(pageservice.spec): update tests for new error mesasge * fix(pageservice.spec): removed extra newline * test(integration): fixed reviews integration tests * test(review): updated spec for new api * tests(notifs + page): fixed failing tests * test(review): fix for dev changes
alexanderleegs
pushed a commit
that referenced
this pull request
Apr 11, 2023
* feat(reviewrequestservice): add initial impl to copute url * chore(errors): add many errors * feat(types): add types * refactor(deployment): chaneg string type to permalink * feat(pageservice): add new pageservice abstration for raw js wrappers * feat(json): add new safeJsonParse util * refactor(reviewrequestservice): refactor to use new page service * refactor(sitesservice): refactor to use new page service * refactor(review): refactor for neverthrow api * chore(server): init page service * chore(pageservice): add comment * fix(reviewrequestservice): add in await * fix(collaboratorsservice): add in unwrap * chore(review.ts): removed vapt fixes * chore(services/types): renamed variables and methods for clarity * chore(errors): removed unneeded properties * fix(server): u9pdate after rebase * fix(review): update after rebase * fix(rebase fixes): add cast cos the `permalink` property is guaranteed but it's opaque atm * chore(server): add code for init of pageservice * chore(rr service): specify return types * fix(notif handler): update to fit new api * test(app): updated specs to fit with new API (#587) * fix(sites.spec): update imports * test(sitesservice): update types * test(reviewrequestservice.spec): update spce * test(collaboratorsservice): fixed tests * chore(databaseerror): add new error * fix(sitesservice): fixed regression in code * test(sitesservice.spec): fixed tests * chore(sitesservice): remove extra console log * chore(sites/user spec): add sync to prevent db clash * chore(databaseerror): removed extra properties * chore(constants): add new constant for homepage name * fix(pageservice): fixed bug allowing empty collections * chore(constants): add new constant for contact-us * refactor(pages): rename property * test(pageservice.spec): add tests * chore(constants): rename homepage constants for consistency * chore(pageservice): remove redundant code * chore(pageservice.spec,): remove extra async * chore(pageservice.spec): standardise imports \ * refactor(pageservice): update parsecolletionpage * test(pageservice.spec): update tests for new error mesasge * fix(pageservice.spec): removed extra newline * test(integration): fixed reviews integration tests * test(review): updated spec for new api * tests(notifs + page): fixed failing tests * test(review): fix for dev changes
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.
Problem
Part of #585, where the specs failed due to the API changes. This PR fixes the failing tests; most of the fixes are mostly cosmetic but here are a few meaningful changes described below.
Solution
SitesService.spec
, the spec whereit("should return UnprocessableError when the GitHub commit is not found")
has been altered to only assert that the service is called once. This is because we now short circuit when either the prod/staging commit could not be fetched, rather than continuing on with the code flow. This is because bothstaging/prod
commit contain info that we use to derive properties without which the flow isn't meaningful anymore.