Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[google_maps_web] Skip a smaller subset of web tests #7087

Closed
wants to merge 9 commits into from

Conversation

bparrishMines
Copy link
Contributor

@bparrishMines bparrishMines commented Jul 9, 2024

This stops skipping all of the web google_maps_flutter tests and only skips the one of the tests on for the platform implementation and all the tests for the app-facing package. I'll continue working on a permanent fix for flutter/flutter#145149.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@bparrishMines bparrishMines changed the title undo web int test skip [google_maps_web] Skip a smaller subset of web tests Jul 17, 2024
@bparrishMines bparrishMines marked this pull request as ready for review July 17, 2024 16:51
@@ -15,6 +16,12 @@ import 'src/tiles_inspector.dart' as tiles_inspector;
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();

// TODO(bparrishMines): These tests are failing on web due to an error being
// thrown after completion. See https://github.com/flutter/flutter/issues/145149
if (isWeb) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I know it'll be a lot more code, but I think it would be better to do something like:

// TODO(bparrishMines): Tests are failing on web due to an error being
// thrown after completion. See https://github.com/flutter/flutter/issues/145149
const bool _skipOnWeb = isWeb;

[ Add skip: _skipOnWeb to every test ]

That way they it'll be obvious both when looking at the test, and from the test run output, that web is skipping tests, vs them being silently skipped in an unusual place.

Comment on lines -3 to -4
# Waiting on https://github.com/flutter/flutter/issues/145149
- google_maps_flutter
Copy link
Member

Choose a reason for hiding this comment

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

Yikes! is this also preventing google_maps_flutter_web from running on CI?

Copy link
Member

Choose a reason for hiding this comment

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

It does:

============================================================
|| Not running for packages/google_maps_flutter/google_maps_flutter_web; excluded [@7:02]
============================================================

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe they were both failing the same way.

Copy link
Member

Choose a reason for hiding this comment

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

I have a "fix" for _web at least:

(The root cause seems to be a bug in the html renderer not letting us adjust the devicePixelRatio)

For the web, I just stripped the DPR overrides from the tests (for now), but in cross-platform tests the DPR overrides probably make more sense.

Copy link
Member

Choose a reason for hiding this comment

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

I think the only tests that need to be disabled are those that set the tester.view.devicePixelRatio AND are running with the html renderer (CHANNEL=stable). Canvaskit seems to not be affected.

Copy link
Contributor

Choose a reason for hiding this comment

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

Would they pass if if we just wrapped the call to set devicePixelRatio in an if (!kIsWeb) (with a TODO to remove that condition later)?

auto-submit bot pushed a commit that referenced this pull request Aug 2, 2024
Attempt to re-enable integration tests on the `google_maps_flutter_web` package, post-package:web migration, see what happens.

Part of: #7087
@ditman
Copy link
Member

ditman commented Aug 2, 2024

I've reenabled the google_maps_flutter_web integration tests here: #7269

I'm almost sure that the issue is related to the html renderer, that crashes when the tests override the DPR of the display (I created an issue for that).

Regardless of what happens to the html renderer, I think we'll be able to reenable the web integration tests in the user-facing package when 3.24 rolls to stable (and we stop using the html renderer for integration tests). We may be also able to restore the DPR overrides that I removed in #7269.

Apologies for arriving late to this party, I just noticed this after we merged a big google maps web migration PR (I had been running the tests locally though).

I'll make sure to link this PR and issue to the cleanup issue as well!

@bparrishMines
Copy link
Contributor Author

@ditman Thanks for landing #7269. I got distracted by other work and meant to come back to this. Should I close this and allow you to handle the fix once 3.24 lands?

@ditman
Copy link
Member

ditman commented Aug 2, 2024

@bparrishMines yep! If you want, you can close this and I'll reenable the tests when all web integration tests run in canvaskit only, as part of flutter/flutter#151869.

@bparrishMines bparrishMines deleted the gmf_web_fix branch August 2, 2024 19:33
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.

3 participants