flutter_glove_box icon indicating copy to clipboard operation
flutter_glove_box copied to clipboard

Adjust the default surfaceSize to be more indicative of a normal device

Open coreysprague opened this issue 5 years ago • 2 comments

WidgetTester defaults to a 800x600 surface size (at 3.0 DPI). We could consider defaulting our golden tests to a more reasonable default (perhaps the dimensions of an iPhone X or Pixel 3). Additionally, consider dropping the DPI to 1.0 in order to speed up the tests.

coreysprague avatar Feb 03 '20 21:02 coreysprague

What would also be helpful (and maybe less breaking) would be to be able to define the default surface area in GoldenToolkitConfiguration once and for all, so we don't have to explicitly set it in every single test when we want to override it.

This would mean :

  • making surfaceSize and textScaleSize of pumpWidgetBuilder optional without a default value (they are optional with a default value right now)
  • when no value is provided , look it up in the "scope's" GoldenToolkitConfiguration
  • if there is no such thing fall back to the current defaults.

I believe a similar approach is currently used for the devices ?

tsimbalar avatar Nov 13 '20 07:11 tsimbalar

@tsimbalar I think this is a great idea.

fatherOfLegends avatar Nov 14 '20 03:11 fatherOfLegends