feat(app): a pipeline's Run and Runs are floating action buttons
This commit is contained in:
@@ -2,6 +2,7 @@ import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:pipelines_app/features/pipelines/ui/run_pipeline_wording.dart';
|
||||
import 'package:pipelines_app/core/api_gateway.dart';
|
||||
import 'package:pipelines_app/features/pipelines/screen.dart';
|
||||
|
||||
@@ -107,10 +108,13 @@ void main() {
|
||||
|
||||
expect(find.bySemanticsLabel('View runs of Alpha review'), findsOneWidget);
|
||||
// Run and Runs share one action row, as the web's pipeline actions.
|
||||
final runs = tester.getCenter(find.byKey(const Key('pipeline-view-runs')));
|
||||
final actions = tester.getRect(find.byKey(const Key('pipeline-actions')));
|
||||
expect(actions.height, lessThan(56));
|
||||
expect(runs.dx, greaterThan(actions.left + 40));
|
||||
// Run and Runs float at the bottom right, Runs above the primary Run.
|
||||
final runs = tester.getRect(find.byKey(const Key('pipeline-view-runs')));
|
||||
final run = tester.getRect(find.byKey(runPipelineActionKey));
|
||||
final screen = tester.view.physicalSize / tester.view.devicePixelRatio;
|
||||
expect(runs.bottom, lessThanOrEqualTo(run.top));
|
||||
expect(run.right, greaterThan(screen.width - 40));
|
||||
expect(run.bottom, greaterThan(screen.height - 120));
|
||||
await tester.tap(find.byKey(const Key('pipeline-view-runs')));
|
||||
expect(opened, [1]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user