openScreenByName method

Future<void> openScreenByName(
  1. String screen, {
  2. Future<void> beforeMutation()?,
})

Implementation

Future<void> openScreenByName(
  String screen, {
  Future<void> Function()? beforeMutation,
}) async {
  await beforeMutation?.call();
  final tc = context.testCase;
  _config = await requireHarness.loadScreen(
    tester: tester,
    testCase: EnsembleTestCase(
      id: tc.id,
      startScreen: screen,
      mockFiles: tc.mockFiles,
      initialState: tc.initialState,
      mocks: tc.mocks,
      steps: const [],
    ),
    existingConfig: _config,
    context: context,
  );
  await _runtime.settle();
}