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

writing integration tests with giphy get #24

Open
Bhupesh-V opened this issue Feb 9, 2022 · 5 comments
Open

writing integration tests with giphy get #24

Bhupesh-V opened this issue Feb 9, 2022 · 5 comments

Comments

@Bhupesh-V
Copy link

Bhupesh-V commented Feb 9, 2022

Any ideas on how to write integration tests for widgets having giphy_get?

A normal flow would be like

  1. Clicking on a button
  2. Giphy get bottom sheet pops up
  3. Get GIFs/Images in View using Finder
  4. Click on a certain GIF

optional steps:

  1. Switching b/w GIFs/Stickers/Emojis tab
  2. Searching for gifs

Any tips would be helpful

@Bhupesh-V
Copy link
Author

Update found how to find gifs in view

 // Check giphy_get codebase, file: giphy_tab_detail.dart
    final allGIFs = find.descendant(
      of: find.byType(InkWell),
      matching: find.byType(ExtendedImage),
    );
    expect(allGIFs, findsWidgets);
    // click on 2nd gif
    await tester.tap(allGIFs.at(2));
    await tester.pumpAndSettle();

@bazookon
Copy link
Owner

Can you add it to the example app?

@Bhupesh-V
Copy link
Author

Can you add it to the example app?

Sure will send a PR for widget tests in example app. I see there a non right now 👍
Do you have any other guidelines for me while writing tests for the example app?

@bazookon
Copy link
Owner

I wrote a simple integration test from documentation, if you add it to that, apreciate!

@Bhupesh-V
Copy link
Author

Sure 👍🏽 will be sending a PR soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants