Git Product home page Git Product logo

jasperessien2 / finder-matcher-gen Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 0.0 2.11 MB

A widget and integration test companion code-generation tool to generate custom Finder and Matcher from annotated widgets

Home Page: https://jasperessien2.github.io/finder-matcher-gen/

Kotlin 0.12% Swift 0.39% Objective-C 0.04% Dart 98.16% Ruby 1.29%
build-runner code-generation dart flutter integration-test tool widget-test

finder-matcher-gen's Introduction

Hi there, I'm Jahswill Essien πŸ‘‹

LinkedIn Β Β  Twitter Follow

I'm a Mobile Developer!!

  • πŸ”­ I just launched my third article: Drawing Bezier curves and Splines with CustomPaint flutter!
  • 🌱 I’m currently learning solidity, while becoming more badass in flutter
  • πŸ‘― I’m looking to collaborate with other flutter developers
  • πŸ₯… 2022 Goals: Contribute more to Open Source projects
  • ⚑ Fun fact: I love to read

Connect with me:

jahswill-dev.web.app EssienJasper | Twitter Jahswill Essien | LinkedIn


Languages and Tools:

Visual Studio Code Android Studio Flutter Dart Android Java Kotlin Python Pytorch Github Git




Flutter paint challenges

Flutter Dash Animation Sponge bob Animation Face Animation
Fanciful color wheel Speedometer Slider Graph Widget
------------- :-------------: -----:
Wave Spinner Widget Water Waves

πŸ“• Latest Blog Posts


Stats

|nightowl |Top Langs |

finder-matcher-gen's People

Contributors

jasperessien2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

finder-matcher-gen's Issues

feat: Generate `hasAncestorOfType` Matcher

Description
A feature that generates a Matcher that asserts that the given finder finds a widget that's inside another widget.

Additional Context

class _IsInCard extends Matcher {
  const _IsInCard();

  @override
  bool matches(covariant Finder finder, Map<dynamic, dynamic> matchState) => _hasAncestorOfType(finder, Card);

  @override
  Description describe(Description description) => description.add('in card');
}

Modify field annotation to accept a default value

Currently generated Finders or Matchers fields or methods that are annotated with @matchDeclaration are validated with a default value: empty string, zero, empty list.

This is not flexible enough.

Prevent each build from overriding modification of generated Finders or Matchers

I might want to modify the generate Finder or Matcher class to suit my need. But running the command to generate new files based on annotations, delete the previous file and regenerates a new file.

Just thinking about it, this occurs due to a change in the code that triggers generation.

Still putting this here to take a look later.

Support generate multiple Matcher/Finder with different check in the same file

It should be able to generate a Matcher for a widget with different match specifications.

@Match(
  matchers: [
    MatchWidget(CollapsibleDropdown, MatchSpecification.matchesOneWidgets),
    MatchWidget(CollapsibleDropdown, MatchSpecification.matchesNoWidgets),
  ],
)

Currently what happens, it generates duplicate matchers with the same name

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.