Skip to content

Commit 29e47fb

Browse files
committed
fix tests
1 parent 3c1c416 commit 29e47fb

File tree

2 files changed

+67
-33
lines changed

2 files changed

+67
-33
lines changed

PostHogTests/PostHogSurveysTest.swift

Lines changed: 55 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -595,8 +595,10 @@ enum PostHogSurveysTest {
595595
"type": "popover",
596596
"questions": [
597597
{
598+
"id": "1",
598599
"type": "open",
599-
"question": "What is a completed survey?"
600+
"question": "What is a completed survey?",
601+
"originalQuestionIndex": 0
600602
}
601603
]
602604
}
@@ -610,8 +612,10 @@ enum PostHogSurveysTest {
610612
"type": "popover",
611613
"questions": [
612614
{
615+
"id": "1",
613616
"type": "open",
614-
"question": "What is a completed survey?"
617+
"question": "What is a completed survey?",
618+
"originalQuestionIndex": 0
615619
}
616620
],
617621
"start_date": "2024-07-23T09:18:18.376000Z"
@@ -626,8 +630,10 @@ enum PostHogSurveysTest {
626630
"type": "popover",
627631
"questions": [
628632
{
633+
"id": "1",
629634
"type": "open",
630-
"question": "What is a completed survey?"
635+
"question": "What is a completed survey?",
636+
"originalQuestionIndex": 0
631637
}
632638
],
633639
"start_date": "2024-07-23T09:18:18.376000Z",
@@ -643,8 +649,10 @@ enum PostHogSurveysTest {
643649
"type": "popover",
644650
"questions": [
645651
{
652+
"id": "1",
646653
"type": "open",
647-
"question": "What is a completed survey?"
654+
"question": "What is a completed survey?",
655+
"originalQuestionIndex": 0
648656
}
649657
],
650658
"conditions": {
@@ -663,8 +671,10 @@ enum PostHogSurveysTest {
663671
"type": "popover",
664672
"questions": [
665673
{
674+
"id": "1",
666675
"type": "open",
667-
"question": "What is a completed survey?"
676+
"question": "What is a completed survey?",
677+
"originalQuestionIndex": 0
668678
}
669679
],
670680
"conditions": {
@@ -683,9 +693,11 @@ enum PostHogSurveysTest {
683693
"description": "survey with feature flags description",
684694
"type": "popover",
685695
"questions": [
686-
{
687-
"type": "open",
688-
"question": "what do you think?"
696+
{
697+
"id": "1",
698+
"type": "open",
699+
"question": "what do you think?",
700+
"originalQuestionIndex": 0
689701
}
690702
],
691703
"feature_flag_keys": [
@@ -700,9 +712,11 @@ enum PostHogSurveysTest {
700712
"description": "survey with feature flags description",
701713
"type": "popover",
702714
"questions": [
703-
{
704-
"type": "open",
705-
"question": "what do you think?"
715+
{
716+
"id": "1",
717+
"type": "open",
718+
"question": "what do you think?",
719+
"originalQuestionIndex": 0
706720
}
707721
],
708722
"feature_flag_keys": [
@@ -717,9 +731,11 @@ enum PostHogSurveysTest {
717731
"description": "survey with feature flags description",
718732
"type": "popover",
719733
"questions": [
720-
{
721-
"type": "open",
722-
"question": "what do you think?"
734+
{
735+
"id": "1",
736+
"type": "open",
737+
"question": "what do you think?",
738+
"originalQuestionIndex": 0
723739
}
724740
],
725741
"start_date": "2024-07-23T09:18:18.376000Z"
@@ -734,9 +750,11 @@ enum PostHogSurveysTest {
734750
"description": "survey with feature flags description",
735751
"type": "popover",
736752
"questions": [
737-
{
738-
"type": "open",
739-
"question": "what do you think?"
753+
{
754+
"id": "1",
755+
"type": "open",
756+
"question": "what do you think?",
757+
"originalQuestionIndex": 0
740758
}
741759
],
742760
"feature_flag_keys": [
@@ -751,9 +769,11 @@ enum PostHogSurveysTest {
751769
"description": "survey with feature flags description",
752770
"type": "popover",
753771
"questions": [
754-
{
755-
"type": "open",
756-
"question": "what do you think?"
772+
{
773+
"id": "1",
774+
"type": "open",
775+
"question": "what do you think?",
776+
"originalQuestionIndex": 0
757777
}
758778
],
759779
"feature_flag_keys": [
@@ -772,9 +792,11 @@ enum PostHogSurveysTest {
772792
"description": "survey with feature flags description",
773793
"type": "popover",
774794
"questions": [
775-
{
776-
"type": "open",
777-
"question": "what do you think?"
795+
{
796+
"id": "1",
797+
"type": "open",
798+
"question": "what do you think?",
799+
"originalQuestionIndex": 0
778800
}
779801
],
780802
"feature_flag_keys": [
@@ -793,9 +815,11 @@ enum PostHogSurveysTest {
793815
"description": "survey with feature flags description",
794816
"type": "popover",
795817
"questions": [
796-
{
797-
"type": "open",
798-
"question": "what do you think?"
818+
{
819+
"id": "1",
820+
"type": "open",
821+
"question": "what do you think?",
822+
"originalQuestionIndex": 0
799823
}
800824
],
801825
"internal_targeting_flag_key": "internal-targeting-flag-enabled",
@@ -811,9 +835,11 @@ enum PostHogSurveysTest {
811835
"description": "survey with feature flags description",
812836
"type": "popover",
813837
"questions": [
814-
{
815-
"type": "open",
816-
"question": "what do you think?"
838+
{
839+
"id": "1",
840+
"type": "open",
841+
"question": "what do you think?",
842+
"originalQuestionIndex": 0
817843
}
818844
],
819845
"internal_targeting_flag_key": "internal-targeting-flag-disabled",

PostHogTests/Resources/fixture_remote_config.json

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@
227227
}
228228
],
229229
"conditions": {
230-
"url": "((us|eu).posthog.com/.*data-warehouse|posthog.com/docs/data-warehouse)",
230+
"url": "((us|eu).posthog.com\/.*data-warehouse|posthog.com\/docs\/data-warehouse)",
231231
"urlMatchType": "regex"
232232
},
233233
"appearance": {
@@ -263,7 +263,7 @@
263263
}
264264
],
265265
"conditions": {
266-
"url": "((us|eu).posthog.com/.*destinations|posthog.com/docs/cdp)",
266+
"url": "((us|eu).posthog.com\/.*destinations|posthog.com\/docs\/cdp)",
267267
"urlMatchType": "regex",
268268
"seenSurveyWaitPeriodInDays": 14
269269
},
@@ -1786,7 +1786,7 @@
17861786
}
17871787
],
17881788
"conditions": {
1789-
"url": "https://posthog\\.com/tutorials/(?:stripe|hubspot|google-ads|zendesk)-reports",
1789+
"url": "https:\/\/posthog\\.com\/tutorials\/(?:stripe|hubspot|google-ads|zendesk)-reports",
17901790
"urlMatchType": "regex",
17911791
"seenSurveyWaitPeriodInDays": 14
17921792
},
@@ -2446,7 +2446,7 @@
24462446
}
24472447
],
24482448
"conditions": {
2449-
"url": "((us|eu).posthog.com/.*data-warehouse|posthog.com/docs/data-warehouse)",
2449+
"url": "((us|eu).posthog.com\/.*data-warehouse|posthog.com\/docs\/data-warehouse)",
24502450
"urlMatchType": "regex"
24512451
},
24522452
"appearance": {
@@ -3764,6 +3764,14 @@
37643764
"current_iteration_start_date": null
37653765
}
37663766
],
3767+
"featureFlags": {
3768+
"linked-flag-enabled": true,
3769+
"linked-flag-disabled": false,
3770+
"survey-targeting-flag-enabled": true,
3771+
"survey-targeting-flag-disabled": false,
3772+
"internal-targeting-flag-enabled": true,
3773+
"internal-targeting-flag-disabled": false
3774+
},
37673775
"defaultIdentifiedOnly": true,
37683776
"siteApps": [
37693777
{

0 commit comments

Comments
 (0)