plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

test(sensors_plus): Integration test

Open Chever-John opened this issue 3 years ago • 2 comments

Description

Now our integration test just supports the Android platform.

Related Issues

This is a GSoC task, so there are no associated issues for now.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • [x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • [x] My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • [ ] All existing and new tests are passing.
  • [ ] I updated the version in pubspec.yaml and CHANGELOG.md.
  • [ ] I updated/added relevant documentation (doc comments with ///).
  • [x] The analyzer (flutter analyze) does not report any problems on my PR.
  • [x] I read and followed the Flutter Style Guide.
  • [x] I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • [ ] Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • [x] No, this is not a breaking change.

Chever-John avatar Aug 28 '22 17:08 Chever-John

The tests are failing, the Accelerometer sometimes gives different values.

The following TestFailure was thrown running a test:
Expected: '[UserAccelerometerEvent (x: 0.0, y: 0.0033512115478515625, z: 0.0002784132957458496)]'
  Actual: '[UserAccelerometerEvent (x: 0.00004880757842329331, y: 0.0033588409423828125, z:
0.00019186735153198242)]'
   Which: is different.
          Expected: ... nt (x: 0.0, y: 0.003 ...
            Actual: ... nt (x: 0.00004880757 ...
                                  ^
           Differ at offset 31

Try to find a way to test this without comparing the exact values

miquelbeltran avatar Sep 06 '22 12:09 miquelbeltran

@miquelbeltran

Okay, find a new way!

Chever-John avatar Sep 06 '22 12:09 Chever-John