Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT
## 2.3.3

* Adds support for version 8 of the Google Maps SDK in apps targeting iOS 14+.
* Updates minimum supported SDK version to Flutter 3.10/Dart 3.0.

## 2.3.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = "The Flutter Authors";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
@import XCTest;
@import os.log;

static const NSTimeInterval kWaitTime = 60;

@interface GoogleMapsUITests : XCTestCase
@property(nonatomic, strong) XCUIApplication *app;
@end
Expand All @@ -25,7 +27,7 @@ - (void)setUp {
XCUIElement *locationPermission =
interruptingElement.buttons[@"Allow While Using App"];
if (![locationPermission
waitForExistenceWithTimeout:30.0]) {
waitForExistenceWithTimeout:kWaitTime]) {
XCTFail(@"Failed due to not able to find "
@"locationPermission button");
}
Expand All @@ -34,7 +36,7 @@ - (void)setUp {
} else {
XCUIElement *allow =
interruptingElement.buttons[@"Allow"];
if (![allow waitForExistenceWithTimeout:30.0]) {
if (![allow waitForExistenceWithTimeout:kWaitTime]) {
XCTFail(@"Failed due to not able to find Allow button");
}
[allow tap];
Expand All @@ -46,14 +48,14 @@ - (void)setUp {
- (void)testUserInterface {
XCUIApplication *app = self.app;
XCUIElement *userInteface = app.staticTexts[@"User interface"];
if (![userInteface waitForExistenceWithTimeout:30.0]) {
if (![userInteface waitForExistenceWithTimeout:kWaitTime]) {
os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription);
XCTFail(@"Failed due to not able to find User interface");
}
[userInteface tap];

XCUIElement *platformView = app.otherElements[@"platform_view[0]"];
if (![platformView waitForExistenceWithTimeout:30.0]) {
if (![platformView waitForExistenceWithTimeout:kWaitTime]) {
os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription);
XCTFail(@"Failed due to not able to find platform view");
}
Expand All @@ -66,7 +68,7 @@ - (void)testUserInterface {
XCUICoordinate *coordinate = [app coordinateWithNormalizedOffset:CGVectorMake(0, 0)];
[coordinate tap];
XCUIElement *compass = app.buttons[@"disable compass"];
if (![compass waitForExistenceWithTimeout:30.0]) {
if (![compass waitForExistenceWithTimeout:kWaitTime]) {
os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription);
XCTFail(@"Failed due to not able to find disable compass button");
}
Expand All @@ -77,20 +79,20 @@ - (void)testUserInterface {
- (void)testMapCoordinatesPage {
XCUIApplication *app = self.app;
XCUIElement *mapCoordinates = app.staticTexts[@"Map coordinates"];
if (![mapCoordinates waitForExistenceWithTimeout:30.0]) {
if (![mapCoordinates waitForExistenceWithTimeout:kWaitTime]) {
os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription);
XCTFail(@"Failed due to not able to find 'Map coordinates''");
}
[mapCoordinates tap];

XCUIElement *platformView = app.otherElements[@"platform_view[0]"];
if (![platformView waitForExistenceWithTimeout:30.0]) {
if (![platformView waitForExistenceWithTimeout:kWaitTime]) {
os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription);
XCTFail(@"Failed due to not able to find platform view");
}

XCUIElement *titleBar = app.otherElements[@"Map coordinates"];
if (![titleBar waitForExistenceWithTimeout:30.0]) {
if (![titleBar waitForExistenceWithTimeout:kWaitTime]) {
os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription);
XCTFail(@"Failed due to not able to find title bar");
}
Expand All @@ -99,7 +101,7 @@ - (void)testMapCoordinatesPage {
[NSPredicate predicateWithFormat:@"label BEGINSWITH 'VisibleRegion'"];
XCUIElement *visibleRegionText =
[app.staticTexts elementMatchingPredicate:visibleRegionPredicate];
if (![visibleRegionText waitForExistenceWithTimeout:30.0]) {
if (![visibleRegionText waitForExistenceWithTimeout:kWaitTime]) {
os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription);
XCTFail(@"Failed due to not able to find Visible Region label'");
}
Expand Down Expand Up @@ -168,30 +170,30 @@ - (void)validateVisibleRegion:(NSString *)label
- (void)testMapClickPage {
XCUIApplication *app = self.app;
XCUIElement *mapClick = app.staticTexts[@"Map click"];
if (![mapClick waitForExistenceWithTimeout:30.0]) {
if (![mapClick waitForExistenceWithTimeout:kWaitTime]) {
os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription);
XCTFail(@"Failed due to not able to find 'Map click''");
}
[mapClick tap];

XCUIElement *platformView = app.otherElements[@"platform_view[0]"];
if (![platformView waitForExistenceWithTimeout:30.0]) {
if (![platformView waitForExistenceWithTimeout:kWaitTime]) {
os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription);
XCTFail(@"Failed due to not able to find platform view");
}

[platformView tap];

XCUIElement *tapped = app.staticTexts[@"Tapped"];
if (![tapped waitForExistenceWithTimeout:30.0]) {
if (![tapped waitForExistenceWithTimeout:kWaitTime]) {
os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription);
XCTFail(@"Failed due to not able to find 'tapped''");
}

[platformView pressForDuration:5.0];

XCUIElement *longPressed = app.staticTexts[@"Long pressed"];
if (![longPressed waitForExistenceWithTimeout:30.0]) {
if (![longPressed waitForExistenceWithTimeout:kWaitTime]) {
os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription);
XCTFail(@"Failed due to not able to find 'longPressed''");
}
Expand All @@ -209,4 +211,67 @@ - (void)forceTap:(XCUIElement *)button {
[coordinate tap];
}

- (void)testMarkerDraggingCallbacks {
XCUIApplication *application = [[XCUIApplication alloc] init];
[application launch];
XCUIElement *placeMarkerButton = application.staticTexts[@"Place marker"];
if (![placeMarkerButton waitForExistenceWithTimeout:kWaitTime]) {
NSLog(@"application.debugDescription: %@", application.debugDescription);
XCTFail(@"Failed to find the Place marker button.");
}
[placeMarkerButton tap];

XCUIElement *Add = application.buttons[@"Add"];
if (![Add waitForExistenceWithTimeout:kWaitTime]) {
NSLog(@"application.debugDescription: %@", application.debugDescription);
XCTFail(@"Failed to find the Add button.");
}
[Add tap];

XCUIElement *marker = application.buttons[@"marker_id_1"];
if (![marker waitForExistenceWithTimeout:kWaitTime]) {
NSLog(@"application.debugDescription: %@", application.debugDescription);
XCTFail(@"Failed to find the marker.");
}
[marker tap];

XCUIElement *toggleDraggable = application.buttons[@"toggle draggable"];
if (![toggleDraggable waitForExistenceWithTimeout:kWaitTime]) {
NSLog(@"application.debugDescription: %@", application.debugDescription);
XCTFail(@"Failed to find the toggle draggable.");
}
[toggleDraggable tap];

// Drag marker to center
[marker pressForDuration:5 thenDragToElement:application];

NSPredicate *predicateDragStart =
[NSPredicate predicateWithFormat:@"label CONTAINS[c] %@", @"_onMarkerDragStart"];
NSPredicate *predicateDrag =
[NSPredicate predicateWithFormat:@"label CONTAINS[c] %@", @"_onMarkerDrag called"];
NSPredicate *predicateDragEnd =
[NSPredicate predicateWithFormat:@"label CONTAINS[c] %@", @"_onMarkerDragEnd"];

XCUIElement *dragStart = [application.staticTexts matchingPredicate:predicateDragStart].element;
if (![dragStart waitForExistenceWithTimeout:kWaitTime]) {
NSLog(@"application.debugDescription: %@", application.debugDescription);
XCTFail(@"Failed to find the _onMarkerDragStart.");
}
XCTAssertTrue(dragStart.exists);

XCUIElement *drag = [application.staticTexts matchingPredicate:predicateDrag].element;
if (![drag waitForExistenceWithTimeout:kWaitTime]) {
NSLog(@"application.debugDescription: %@", application.debugDescription);
XCTFail(@"Failed to find the _onMarkerDrag.");
}
XCTAssertTrue(drag.exists);

XCUIElement *dragEnd = [application.staticTexts matchingPredicate:predicateDragEnd].element;
if (![dragEnd waitForExistenceWithTimeout:kWaitTime]) {
NSLog(@"application.debugDescription: %@", application.debugDescription);
XCTFail(@"Failed to find the _onMarkerDragEnd.");
}
XCTAssertTrue(dragEnd.exists);
}

@end
Loading