Skip to content

[google_maps_flutter_web] Help web integration tests pass.#18

Merged
aednlaxer merged 1 commit intoCodemateLtd:feature/google-maps-advanced-markers-supportfrom
ditman:feature/google-maps-advanced-markers-support
Feb 5, 2025
Merged

[google_maps_flutter_web] Help web integration tests pass.#18
aednlaxer merged 1 commit intoCodemateLtd:feature/google-maps-advanced-markers-supportfrom
ditman:feature/google-maps-advanced-markers-support

Conversation

@ditman
Copy link

@ditman ditman commented Feb 5, 2025

  • Update mocks (they had drifted with the latest changes)
  • Make Markers/Clustering target types less specific (remove extends JSObject) so mockito can mock them.

Removing the T extends JSObject from some of the code that we intend to mock with mockito is needed, because mockito can't generate JSObjects, and we get errors like this:

Launching integration_test/google_maps_controller_test.dart on Web Server in debug mode...
org-dartlang-app:/google_maps_controller_test.mocks.dart:282:16: Error: Type argument 'Object?' doesn't conform to
the bound 'JSObject' of the type variable 'T' on 'MarkersController'.
 - 'Object' is from 'dart:core'.
Try changing type arguments so that they conform to the bounds.
    implements _i2.MarkersController<Object?, Object> {
               ^
../lib/src/markers.dart:13:34: Context: This is the type variable whose bound isn't conformed to.
abstract class MarkersController<T extends JSObject, O>
                                 ^

/cc @aednlaxer

* Update mocks (they had drifted with the latest changes)
* Make Markers/Clustering target types less specific (remove extends
  JSObject) so mockito can mock them.
@ditman ditman changed the title Help web integration tests pass. [google_maps_flutter_web] Help web integration tests pass. Feb 5, 2025
Copy link
Collaborator

@aednlaxer aednlaxer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic, thanks!

@aednlaxer aednlaxer merged commit 5f6e166 into CodemateLtd:feature/google-maps-advanced-markers-support Feb 5, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants