Skip to content

Commit d556899

Browse files
fix: resolve failing tests (#458)
* fix: change-log typo * ci: fix appium issue
1 parent c1f7851 commit d556899

15 files changed

+97
-93
lines changed

.circleci/config.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ commands:
4747
steps:
4848
- run:
4949
name: Install XCUITest Driver
50-
command: appium driver install xcuitest@4.35.0
50+
command: appium driver install xcuitest@7.14.0
5151
- when:
5252
condition:
5353
equal:
@@ -56,7 +56,7 @@ commands:
5656
steps:
5757
- run:
5858
name: Install UIAutomator2 Driver
59-
command: appium driver install uiautomator2@2.29.5
59+
command: appium driver install uiautomator2@3.1.0
6060
- run:
6161
name: Launch Appium
6262
# Enable --relaxed-security for `mobile: shell` command that Captain uses internally.
@@ -162,13 +162,14 @@ jobs:
162162
- setup_flutter
163163
- android/start-emulator-and-run-tests:
164164
run-tests-working-directory: e2e
165+
additional-avd-args: --device 3
165166
system-image: system-images;android-33;default;x86_64
166167
post-emulator-launch-assemble-command: cd example && flutter build apk --debug
167168
test-command: dotnet test
168169

169170
test_ios:
170171
macos:
171-
xcode: 15.3.0
172+
xcode: 15.2.0
172173
resource_class: macos.m1.medium.gen1
173174
environment:
174175
INSTABUG_SOURCEMAPS_UPLOAD_DISABLE: true
@@ -184,12 +185,12 @@ jobs:
184185
-scheme Runner \
185186
-resultBundlePath coverage/result.xcresult \
186187
-sdk iphonesimulator \
187-
-destination 'platform=iOS Simulator,name=iPhone 15 Pro Max,OS=17.4' \
188+
-destination 'platform=iOS Simulator,name=iPhone 15 Pro Max,OS=17.2' \
188189
test | xcpretty
189190
190191
e2e_ios_captain:
191192
macos:
192-
xcode: 15.3.0
193+
xcode: 15.2.0
193194
resource_class: macos.m1.medium.gen1
194195
steps:
195196
- advanced-checkout/shallow-checkout
@@ -242,7 +243,7 @@ jobs:
242243

243244
release:
244245
macos:
245-
xcode: 15.3.0
246+
xcode: 15.2.0
246247
resource_class: macos.m1.medium.gen1
247248
working_directory: "~"
248249
steps:

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
### Added
66

77
- Adds custom app rating api ([#453](https://github.com/Instabug/Instabug-Flutter/pull/453))
8-
- Add `SessionReplay.getSessionReplayLink` API which retrieves the current session's replay link ([#445](hhttps://github.com/Instabug/Instabug-Flutter/pull/445)).
8+
- Add `SessionReplay.getSessionReplayLink` API which retrieves the current session's replay link ([#445](https://github.com/Instabug/Instabug-Flutter/pull/445)).
99
- Add support for App Flows APIs `APM.startFlow`, `APM.endFlow` and `APM.setFlowAttribute` ([#446](https://github.com/Instabug/Instabug-Flutter/pull/446)).
1010

1111
### Deprecated

e2e/BugReportingTests.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public void ShakeInvocationEvent()
6969
[Fact]
7070
public void TwoFingersSwipeLeftInvocationEvent()
7171
{
72+
ScrollUp();
7273
captain.FindByText("Two Fingers Swipe Left").Tap();
7374

7475
Thread.Sleep(500);
@@ -112,6 +113,8 @@ public void ManualInvocation()
112113
[Fact]
113114
public void MultipleScreenshotsInReproSteps()
114115
{
116+
ScrollDown();
117+
115118
captain.FindByText("Enter screen name").Tap();
116119
captain.Type("My Screen");
117120
captain.HideKeyboard();
@@ -189,6 +192,8 @@ public void ChangeFloatingButtonEdge()
189192
[Fact]
190193
public void OnDismissCallbackIsCalled()
191194
{
195+
ScrollUp();
196+
192197
captain.FindByText("Set On Dismiss Callback").Tap();
193198
captain.FindByText("Invoke").Tap();
194199

e2e/FeatureRequestsTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ public class FeatureRequestsTests : CaptainTest
1111
public void ShowFeatureRequetsScreen()
1212
{
1313
ScrollDown();
14+
ScrollDown();
15+
1416
captain.FindByText("Show Feature Requests").Tap();
1517

1618
var screenTitle = captain.FindById(

e2e/Utils/CaptainTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ public class CaptainTest : IDisposable
99
{
1010
AndroidApp = Path.GetFullPath("../../../../example/build/app/outputs/flutter-apk/app-debug.apk"),
1111
AndroidAppId = "com.instabug.flutter.example",
12-
AndroidVersion = "13",
12+
AndroidVersion = "14",
1313
IosApp = Path.GetFullPath("../../../../example/build/ios/iphonesimulator/Runner.app"),
1414
IosAppId = "com.instabug.InstabugSample",
15-
IosVersion = "17.4",
15+
IosVersion = "17.2",
1616
IosDevice = "iPhone 15 Pro Max"
1717
};
1818
protected static readonly Captain captain = new(_config);

example/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ android {
4444

4545
defaultConfig {
4646
applicationId "com.instabug.flutter.example"
47-
minSdkVersion 18
47+
minSdkVersion flutter.minSdkVersion
4848
targetSdkVersion 30
4949
versionCode flutterVersionCode.toInteger()
5050
versionName flutterVersionName

example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ subprojects {
2626
project.evaluationDependsOn(':app')
2727
}
2828

29-
task clean(type: Delete) {
29+
tasks.register("clean", Delete) {
3030
delete rootProject.buildDir
3131
}

example/ios/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ SPEC CHECKSUMS:
2828
instabug_flutter: c8293ec7ad7ffe049c743a0057601838b8af505d
2929
OCMock: 5ea90566be239f179ba766fd9fbae5885040b992
3030

31-
PODFILE CHECKSUM: 637e800c0a0982493b68adb612d2dd60c15c8e5c
31+
PODFILE CHECKSUM: 4de1907d67185ba01b9d9c952bfb1b2c3b10d282
3232

3333
COCOAPODS: 1.13.0

example/lib/main.dart

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -170,17 +170,17 @@ class _MyHomePageState extends State<MyHomePage> {
170170
Surveys.showSurvey('PMqUZXqarkOR2yGKiENB4w');
171171
}
172172

173-
final _scaffoldKey=GlobalKey<ScaffoldState>();
173+
final _scaffoldKey = GlobalKey<ScaffoldState>();
174174

175175
void getCurrentSessionReplaylink() async {
176-
final result=await SessionReplay.getSessionReplayLink();
177-
if(result==null){
176+
final result = await SessionReplay.getSessionReplayLink();
177+
if (result == null) {
178178
const snackBar = SnackBar(
179179
content: Text('No Link Found'),
180180
);
181181
ScaffoldMessenger.of(_scaffoldKey.currentContext!).showSnackBar(snackBar);
182-
}else{
183-
var snackBar = SnackBar(
182+
} else {
183+
var snackBar = SnackBar(
184184
content: Text(result),
185185
);
186186
ScaffoldMessenger.of(_scaffoldKey.currentContext!).showSnackBar(snackBar);
@@ -225,7 +225,7 @@ class _MyHomePageState extends State<MyHomePage> {
225225
appBar: AppBar(title: Text(widget.title)),
226226
body: SingleChildScrollView(
227227
physics: ClampingScrollPhysics(),
228-
padding: const EdgeInsets.only(top: 20.0),
228+
padding: const EdgeInsets.only(top: 20.0, bottom: 16),
229229
child: Column(
230230
mainAxisAlignment: MainAxisAlignment.center,
231231
children: <Widget>[
@@ -360,7 +360,7 @@ class _MyHomePageState extends State<MyHomePage> {
360360
),
361361
SectionTitle('Color Theme'),
362362
ButtonBar(
363-
mainAxisSize: MainAxisSize.max,
363+
mainAxisSize: MainAxisSize.min,
364364
alignment: MainAxisAlignment.center,
365365
children: <Widget>[
366366
ElevatedButton(
@@ -380,15 +380,13 @@ class _MyHomePageState extends State<MyHomePage> {
380380
),
381381
child: const Text('Dark'),
382382
),
383-
384-
385-
SectionTitle('Sessions Replay'),
386-
InstabugButton(
387-
onPressed: getCurrentSessionReplaylink,
388-
text: 'Get current session replay link',
389-
),
390383
],
391384
),
385+
SectionTitle('Sessions Replay'),
386+
InstabugButton(
387+
onPressed: getCurrentSessionReplaylink,
388+
text: 'Get current session replay link',
389+
),
392390
],
393391
)), // This trailing comma makes auto-formatting nicer for build methods.
394392
);

0 commit comments

Comments
 (0)