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

feature/integration-tests #115

Closed
wants to merge 38 commits into from

Conversation

Ahmadre
Copy link
Contributor

@Ahmadre Ahmadre commented Aug 12, 2021

Motivation

For the Release 1.0 of Sidekick, all features have to be tested well. To do so, Integration Tests helps us here to make sure our app is working on different devices and environments.

Besides this PR, I would also recommend Unit-Tests so developers are getting immediately a feedback while they're coding. E2E Tests are taking a bit longer. You can test them locally, but the main purpose for this PR is that these Tests will run in a CI-Environment so that Github Actions is doing that job for us.

This PR is not using any packages, it relies on the latest integration_test package from Flutter Framework which got efficient updates where we can combine everything with external tools (like Test Lab and so on).

Related Issues

Closes: #97

@Ahmadre Ahmadre changed the title feature/integration-tests [DRAFT]: feature/integration-tests Aug 12, 2021
@Ahmadre
Copy link
Contributor Author

Ahmadre commented Aug 12, 2021

@aguilaair for tomorrow:

do you know why this happens on github actions:

VMServiceFlutterDriver: Connecting to Flutter application at http://127.0.0.1:49408/Gi5C0LTKwyQ=/
VMServiceFlutterDriver: Isolate found with number: 671082393529519
VMServiceFlutterDriver: Isolate is paused at start.
VMServiceFlutterDriver: Attempting to resume isolate
flutter: 00:00 +0: (setUpAll)
flutter: 00:00 +1: AppShell Tests Navigation works
VMServiceFlutterDriver: Connected to Flutter application.
flutter: (The following exception is now available via WidgetTester.takeException:)
flutter: ══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
flutter: The following FileSystemException was thrown running a test:
flutter: Directory listing failed, path = '/Users/runner/fvm/versions/' (OS Error: No such file or directory,
flutter: errno = 2)

I tried to copy the preparation steps before running the flutter drive tests.

@aguilaair
Copy link
Collaborator

After meeting with @Ahmadre we have concluded the issue was related to the presence of the .fvm folder, which caused issues with the CLI

@aguilaair aguilaair added the enhancement New feature or request label Aug 14, 2021
@aguilaair
Copy link
Collaborator

I'll look into why this is still failing ASAP.

@Ahmadre
Copy link
Contributor Author

Ahmadre commented Aug 14, 2021

I'll look into why this is still failing ASAP.

I had now the same error when I setup my fresh windows.

I think it is because FVM is not installed as a dependency.

I added a step to install it, but maybe my PATH is not correct.

@Ahmadre
Copy link
Contributor Author

Ahmadre commented Aug 15, 2021

Thanks @aguilaair for your fix to get the tests running. I will cover all other components and write the integration tests for them and then it should be merged :)

@Ahmadre Ahmadre changed the title [DRAFT]: feature/integration-tests feature/integration-tests Aug 22, 2021
@Ahmadre
Copy link
Contributor Author

Ahmadre commented Aug 22, 2021

@leoafarias I recognized that the Mouse Cursor was wrong here:

IMG_2375

That was because of the null value in IconButton, so I fixed that also here:

MouseRegion(
  cursor: SystemMouseCursors.click,
  child: Padding(
    /// This is the same padding as `IconButton`
    padding: const EdgeInsets.all(8.0),
    child: Icon(
      expand ? MdiIcons.chevronDown : MdiIcons.chevronUp,
    ),
  ),
),

@leoafarias
Copy link
Owner

@Ahmadre thanks for fixing this. Let me know once this is ready for review.

@Ahmadre
Copy link
Contributor Author

Ahmadre commented Sep 12, 2021

@leoafarias @aguilaair

I am trying to write the most important test for installing and updating a release in the ReleasesScreen.

But I'm stuck here:

Bildschirmfoto 2021-09-12 um 02 28 50

I'm not really secure with the actual codebase and I don't know which async process I should use here. The reason is: I need to wait for a success or failure notification to test this part properly. For that I would like to use runAsync() and react to the live-callback.

Do you guys have any idea? Or have maybe some time to take a look at it in Zoom?

@leoafarias
Copy link
Owner

@rebarah After you install the release, the fvm_queue.provider.dart will keep track of any active items. I believe the best way to is to wait for the active item to switch and to recheck the status of the release.

Let me know if that helps, if not we can coordinate a zoom call.

@Ahmadre
Copy link
Contributor Author

Ahmadre commented Sep 13, 2021

@rebarah After you install the release, the fvm_queue.provider.dart will keep track of any active items. I believe the best way to is to wait for the active item to switch and to recheck the status of the release.

Let me know if that helps, if not we can coordinate a zoom call.

Sounds great :)! Thanks I'll do that 💪🏼

@leoafarias
Copy link
Owner

@aguilaair talked with @Ahmadre and we will be taking over finalizing this

@leoafarias
Copy link
Owner

Moving this to #165 so we can make edits

@leoafarias leoafarias closed this Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integration tests
4 participants