File tree Expand file tree Collapse file tree 8 files changed +32
-25
lines changed
main/kotlin/pro/qyoga/i9ns/pushes/web/model
testFixtures/kotlin/pro/qyoga/tests/pages/therapist/clients/journal/list
test/kotlin/pro/qyoga/tests
cases/app/i9ns/pushes/web Expand file tree Collapse file tree 8 files changed +32
-25
lines changed Original file line number Diff line number Diff line change 11package pro.qyoga.i9ns.pushes.web.model
22
3+ import org.simpleframework.xml.Version
4+ import org.springframework.data.annotation.CreatedDate
35import org.springframework.data.annotation.Id
6+ import org.springframework.data.annotation.LastModifiedDate
47import org.springframework.data.annotation.Transient
58import org.springframework.data.relational.core.mapping.Table
69import pro.azhidkov.platform.uuid.UUIDv7
@@ -15,9 +18,9 @@ data class TherapistWebPushSubscription(
1518 val subscription : WebPushSubscription ,
1619
1720 @Id val id : UUID = UUIDv7 .randomUUID(),
18- val createdAt : Instant = Instant .now(),
19- val updatedAt : Instant ? = null ,
20- val version : Long = 0
21+ @CreatedDate val createdAt : Instant = Instant .now(),
22+ @LastModifiedDate val updatedAt : Instant ? = null ,
23+ @Version val version : Long = 0
2124) {
2225
2326 @Transient
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import io.kotest.matchers.shouldBe
55import org.junit.jupiter.api.DisplayName
66import org.junit.jupiter.api.Test
77import pro.qyoga.tests.clients.api.TrainerAdvisorApis
8+ import pro.qyoga.tests.clients.api.WebPushes
89import pro.qyoga.tests.fixture.object_mothers.pushes.web.WebPushesObjectMother.aWebPushSubscription
910import pro.qyoga.tests.fixture.object_mothers.therapists.THE_THERAPIST_REF
1011import pro.qyoga.tests.fixture.test_apis.WebPushesTestApi
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import io.kotest.matchers.shouldBe
44import org.junit.jupiter.api.DisplayName
55import org.junit.jupiter.api.Test
66import pro.qyoga.tests.clients.api.TrainerAdvisorApis
7+ import pro.qyoga.tests.clients.api.WebPushes
78import pro.qyoga.tests.infra.test_config.spring.context
89import pro.qyoga.tests.infra.web.QYogaAppBaseTest
910
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import io.kotest.matchers.shouldNotBe
77import org.junit.jupiter.api.DisplayName
88import org.junit.jupiter.api.Test
99import pro.qyoga.tests.clients.api.TrainerAdvisorApis
10+ import pro.qyoga.tests.clients.api.WebPushes
1011import pro.qyoga.tests.fixture.object_mothers.pushes.web.WebPushesObjectMother.aWebPushSubscription
1112import pro.qyoga.tests.fixture.object_mothers.therapists.THE_THERAPIST_REF
1213import pro.qyoga.tests.fixture.test_apis.NotificationsTestApi
Original file line number Diff line number Diff line change @@ -8,17 +8,17 @@ import pro.qyoga.app.therapist.appointments.core.schedule.settings.Notifications
88import pro.qyoga.tests.infra.web.mainWebTestClient
99import pro.qyoga.tests.platform.spring.web_test_client.getBodyAsString
1010
11- object Notifications {
11+ object NotificationsApiFactory {
1212
1313 fun therapistApi (
1414 principal : Cookie ,
1515 ) = NotificationsTherapistApi (principal, mainWebTestClient)
1616
1717}
1818
19- @Suppress(" UnusedReceiverParameter" , " RemoveRedundantQualifierName " )
19+ @Suppress(" UnusedReceiverParameter" )
2020val TrainerAdvisorApis .Notifications
21- get() = pro.qyoga.tests.clients.api. Notifications
21+ get() = NotificationsApiFactory
2222
2323class NotificationsTherapistApi (
2424 override val authCookie : Cookie ,
Original file line number Diff line number Diff line change 11package pro.qyoga.tests.clients.api
22
3- import io.restassured.http.Cookie
4- import pro.qyoga.tests.infra.web.mainWebTestClient
53
6-
7- object TrainerAdvisorApis {
8-
9- object WebPushes {
10-
11- val publicApi = WebPushesPublicApi (mainWebTestClient)
12-
13- fun therapistApi (
14- principal : Cookie ,
15- ) = WebPushesTherapistApi (principal, mainWebTestClient)
16-
17- }
18-
19- }
4+ object TrainerAdvisorApis
Original file line number Diff line number Diff line change 11package pro.qyoga.tests.clients.api
22
3+ import io.restassured.http.Cookie
34import org.springframework.test.web.reactive.server.WebTestClient
45import org.springframework.test.web.reactive.server.returnResult
56import pro.qyoga.app.publc.pushes.web.PushesPublicKeyController
7+ import pro.qyoga.tests.infra.web.mainWebTestClient
68
79
10+ object WebPushesApiFactory {
11+
12+ val publicApi = WebPushesPublicApi (mainWebTestClient)
13+
14+ fun therapistApi (
15+ principal : Cookie ,
16+ ) = WebPushesTherapistApi (principal, mainWebTestClient)
17+
18+ }
19+
20+ @Suppress(" UnusedReceiverParameter" )
21+ val TrainerAdvisorApis .WebPushes
22+ get() = WebPushesApiFactory
23+
824class WebPushesPublicApi (
925 private val client : WebTestClient
1026) {
Original file line number Diff line number Diff line change @@ -24,10 +24,10 @@ object ClientJournalFragment {
2424
2525 fun fragmentFor (entries : List <JournalEntry >, hasMore : Boolean = false): ComponentMatcher =
2626 ComponentMatcher (" #journal-fragment" ) { element ->
27- element shouldHaveComponent addEntryLink
27+ element shouldHaveComponent addEntryLink
2828
29- ClientJournalEntriesFragment .fragmentFor(entries, hasMore).match(element)
30- }
29+ ClientJournalEntriesFragment .fragmentFor(entries, hasMore).match(element)
30+ }
3131
3232}
3333
You can’t perform that action at this time.
0 commit comments