// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter_test/flutter_test.dart';
import 'package:flutter/widgets.dart';

void main() {
  testWidgets('Placeholder control test', (WidgetTester tester) async {
    GlobalKey<PlaceholderState> key = new GlobalKey<PlaceholderState>();

    await tester.pumpWidget(new Placeholder(key: key));

    key.currentState.child = new Text('target');

    expect(find.text('target'), findsNothing);

    await tester.pump();

    expect(find.text('target'), findsOneWidget);
  });
}
