Skip to content

Commit b66a661

Browse files
committed
tests
1 parent fd86804 commit b66a661

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Sources/FormbricksSDK/Manager/SurveyManager.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,21 @@ final class SurveyManager {
6363
/// Checks if there are any surveys to display, based in the track action, and if so, displays the first one.
6464
/// Handles the display percentage and the delay of the survey.
6565
func track(_ action: String) {
66+
print("first line survey manager's track: ")
67+
print(isShowingSurvey)
68+
6669
guard !isShowingSurvey else { return }
6770

71+
print(environmentResponse)
72+
6873
let actionClasses = environmentResponse?.data.data.actionClasses ?? []
6974
let codeActionClasses = actionClasses.filter { $0.type == "code" }
7075
let actionClass = codeActionClasses.first { $0.key == action }
7176
let firstSurveyWithActionClass = filteredSurveys.first { survey in
7277
return survey.triggers?.contains(where: { $0.actionClass?.name == actionClass?.name }) ?? false
7378
}
79+
80+
print("found a survey with the action class having id: ", firstSurveyWithActionClass?.id)
7481

7582
// Display percentage
7683
let shouldDisplay = shouldDisplayBasedOnPercentage(firstSurveyWithActionClass?.displayPercentage)

0 commit comments

Comments
 (0)