Skip to content
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

feat: Enhanced activity & notifications #2330

Draft
wants to merge 53 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
bc0f83c
feat: notifications core service draft
cyyynthia Nov 14, 2023
1ec0527
chore: cleanup batch job internal events
cyyynthia Nov 19, 2023
eefcec0
feat: core user notification dispatch
cyyynthia Nov 19, 2023
c4a183c
chore: lint
cyyynthia Nov 19, 2023
fcecce7
feat: finish user notification dispatch logic
cyyynthia Nov 20, 2023
bd8bfab
fix: make fetching translation to language maps work again
cyyynthia Nov 21, 2023
a850303
tests: test notification dispatching
cyyynthia Nov 24, 2023
3f10a64
Merge remote-tracking branch 'origin/main' into cynthia/notifications…
cyyynthia Nov 24, 2023
3b31359
feat: redo notifications the right way this time
cyyynthia Dec 3, 2023
397dd08
chore(deps): solve ij classpath issues with json-unit & assertj
cyyynthia Dec 3, 2023
9f1c7cd
feat: debounce key creation and initial string creations
cyyynthia Dec 3, 2023
c97c9e9
feat: notification preference configuration
cyyynthia Dec 3, 2023
85149be
feat: respect notification subscription settings
cyyynthia Dec 3, 2023
f235131
tests: fix json number matching
cyyynthia Dec 4, 2023
caa4ce4
fix: handle modified entity relations using rdbms-level cascade
cyyynthia Dec 4, 2023
2384df9
chore: lint
cyyynthia Dec 4, 2023
be30fc9
fix: hibernate proxy behavior
cyyynthia Dec 4, 2023
16de53b
tests: remove unused mockbean
cyyynthia Dec 4, 2023
19d7c6e
fix: hibernate lazy initialization problems
cyyynthia Dec 4, 2023
e612c0c
feat: implement notification http endpoints
cyyynthia Dec 13, 2023
4aebb94
fix: notification updates
cyyynthia Dec 13, 2023
621113a
Merge remote-tracking branch 'origin/main' into cynthia/notifications…
cyyynthia Dec 13, 2023
38e938a
fix: key creation test
cyyynthia Dec 13, 2023
9569892
Merge remote-tracking branch 'origin/main' into cynthia/notifications…
cyyynthia Jan 22, 2024
8823857
Merge remote-tracking branch 'origin/main' into cynthia/notifications…
cyyynthia Jan 24, 2024
1d54b2e
fix: migrate notifications to Spring Boot 3
cyyynthia Jan 26, 2024
49b8710
Merge remote-tracking branch 'origin/main' into cynthia/notifications…
cyyynthia Jan 26, 2024
1698670
chore: format
cyyynthia Jan 26, 2024
cda1335
fix(tests): handle bad transactions
cyyynthia Jan 26, 2024
b838b7f
fix: make language permission fetching more efficient
cyyynthia Jan 27, 2024
c845dda
Merge remote-tracking branch 'origin/cynthia/notifications-core' into…
cyyynthia Jan 27, 2024
b841451
chore: ktlint
cyyynthia Jan 27, 2024
c208be0
fix: bad aggregation result
cyyynthia Jan 27, 2024
0601b71
fix: bad permission mock
cyyynthia Jan 27, 2024
9cb51f4
chore(webapp): cleanup & update some deps
cyyynthia Feb 5, 2024
ac25e49
feat: add notification bell and root view
cyyynthia Feb 5, 2024
ca62a12
fix: workaround the fact npm is a bad pkg manager
cyyynthia Feb 5, 2024
a6e0362
feat: skeleton of the notifications view
cyyynthia Feb 14, 2024
f018b9b
Merge remote-tracking branch 'origin/cynthia/notifications-core' into…
cyyynthia Feb 14, 2024
cbb7633
Merge branch 'main' into cynthia/notifications-core
cyyynthia Apr 29, 2024
f1e0ee9
fix: use listagg instead of array_agg
cyyynthia Apr 29, 2024
0f2dca5
fix: Minor updates
JanCizmar May 15, 2024
2c3c8f7
feat: Provide swagger schemas of activity modifications
JanCizmar May 17, 2024
c6ed341
feat: Activity type definitions, activity grouping
JanCizmar May 30, 2024
dab8b16
feat: Grouper
JanCizmar May 30, 2024
5fb7b38
fix: Add JOOQ, activity grouping stuff
JanCizmar Jun 6, 2024
4e7166a
Merge branch 'main' into jancizmar/notifications-activity-grouping
JanCizmar Jul 29, 2024
3a8d10c
feat: Project creation group backend
JanCizmar Jul 31, 2024
80b59d4
feat: "Create Key" group with items
JanCizmar Aug 22, 2024
0431b7a
feat: "Create Key" group with items
JanCizmar Aug 22, 2024
59cf99c
feat: "Create Key" group items and their relations
JanCizmar Sep 4, 2024
59bc144
feat: Store base translation value for key
JanCizmar Sep 14, 2024
8a77db4
feat: Activity grouping
JanCizmar Nov 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tests: fix json number matching
cyyynthia committed Dec 4, 2023
commit f235131eb840b2a0a48ead9a61134f6bc5ec36c9
Original file line number Diff line number Diff line change
@@ -3,7 +3,14 @@ package io.tolgee.api.v2.controllers.v2ProjectsController
import io.tolgee.ProjectAuthControllerTest
import io.tolgee.development.testDataBuilder.data.BaseTestData
import io.tolgee.development.testDataBuilder.data.ProjectsTestData
import io.tolgee.fixtures.*
import io.tolgee.fixtures.andAssertThatJson
import io.tolgee.fixtures.andIsBadRequest
import io.tolgee.fixtures.andIsNotFound
import io.tolgee.fixtures.andIsOk
import io.tolgee.fixtures.andPrettyPrint
import io.tolgee.fixtures.generateUniqueString
import io.tolgee.fixtures.isPermissionScopes
import io.tolgee.fixtures.node
import io.tolgee.model.Permission
import io.tolgee.model.UserAccount
import io.tolgee.model.enums.ProjectPermissionType
@@ -75,24 +82,26 @@ open class V2ProjectsControllerTest : ProjectAuthControllerTest("/v2/projects/")
node("[0].organizationOwner.name").isEqualTo("test_username")
node("[0].directPermission.scopes").isPermissionScopes(ProjectPermissionType.MANAGE)
node("[0].computedPermission.scopes").isPermissionScopes(ProjectPermissionType.MANAGE)
node("[0].stats.translationStatePercentages").isEqualTo(
"""
{
"UNTRANSLATED": 100.0,
"TRANSLATED": 0,
"REVIEWED": 0
}
"""
)
node("[1].stats.translationStatePercentages").isEqualTo(
"""
{
"UNTRANSLATED": 25.0,
"TRANSLATED": 75.0,
"REVIEWED": 0.0
}
"""
)
node("[0].stats.translationStatePercentages")
.isEqualTo(
"""
{
"UNTRANSLATED": 100.0,
"TRANSLATED": 0,
"REVIEWED": 0
}
"""
)
node("[1].stats.translationStatePercentages")
.isEqualTo(
"""
{
"UNTRANSLATED": 25.0,
"TRANSLATED": 75.0,
"REVIEWED": 0
}
"""
)
}
}
}
Original file line number Diff line number Diff line change
@@ -58,7 +58,18 @@ val ResultActions.andAssertThatJson: JsonAssert.ConfigurableJsonAssert

fun ResultActions.andAssertThatJson(jsonAssert: JsonAssert.ConfigurableJsonAssert.() -> Unit): ResultActions {
tryPrettyPrinting {
jsonAssert(assertThatJson(this.andGetContentAsString))
jsonAssert(
assertThatJson(this.andGetContentAsString)
// https://github.com/lukas-krecan/JsonUnit?tab=readme-ov-file#numerical-comparison
// We only care about the numeric value, not the precision. Not the business of doing physics (...yet)! :p
.withConfiguration {
it.withNumberComparator { a, b, tolerance ->
val diff = if (a > b) a - b else b - a
diff <= (tolerance ?: BigDecimal.ZERO)
}
}
)

this
}
return this