Skip to content

Commit adda141

Browse files
allisonbm92schmidt-sebastian
authored andcommitted
Add Inapp Messaging smoke test. (#569)
Inapp Messaging does not have an interface to trigger updates from the device. As a result, this test simply verifies intialization and build compatibility. However, the latest release of Inapp Messaging is build incompatible with the head state of AB Testing. As such, this test is disabled for now.
1 parent 21c8562 commit adda141

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

smoke-tests/build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ android {
4848
applicationId "com.google.firebase.testing.combined"
4949
}
5050
}
51+
52+
// TODO(allisonbm92): Enable the Inapp Messaging test after the next release. The current release
53+
// is incompatible with the head state of AB Testing (required by Remote Config).
54+
sourceSets.combined.java.filter.exclude "**/inappmessaging/**"
5155
}
5256

5357
apply from: "configure.gradle"
@@ -66,6 +70,7 @@ dependencies {
6670
combinedImplementation "com.google.firebase:firebase-database"
6771
combinedImplementation "com.google.firebase:firebase-firestore"
6872
combinedImplementation "com.google.firebase:firebase-functions"
73+
// combinedImplementation "com.google.firebase:firebase-inappmessaging"
6974
combinedImplementation "com.google.firebase:firebase-config"
7075
combinedImplementation "com.google.firebase:firebase-storage"
7176
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Copyright 2018 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
package com.google.firebase.testing.inappmessaging;
16+
17+
import static com.google.common.truth.Truth.assertThat;
18+
19+
import com.google.firebase.inappmessaging.FirebaseInAppMessaging;
20+
import org.junit.Test;
21+
import org.junit.runner.RunWith;
22+
import org.junit.runners.JUnit4;
23+
24+
@RunWith(JUnit4.class)
25+
public final class InappMessagingTest {
26+
27+
@Test
28+
public void getInstanceReturnsNotNull() {
29+
assertThat(FirebaseInAppMessaging.getInstance()).isNotNull();
30+
}
31+
}

0 commit comments

Comments
 (0)