MatrixAppTest class final

Tests that the matrix adds to the apps it generates and runs with flutter test: the files of a directory for the apps that appliesTo accepts.

They check what only a running app shows, such as that the start-up of the app works with the platform side of its plugins mocked, and a package keeps them, such as the package of the module they test. They are not part of the apps that smf create generates.

Constructors

MatrixAppTest(String directory, {required bool appliesTo(MatrixApp app), List<String> devDependencies = const [], Map<String, String> values(MatrixApp app)?, Map<String, String> generatedFiles(MatrixApp app, String packageName)?, Set<Role<Object>> roles = const {}, MatrixMocks? mocks, MatrixStartProbe? startProbe, bool readsStartProbes = false})
Creates the tests of the files in directory for the apps that appliesTo accepts.
const

Properties

appliesTo → bool Function(MatrixApp app)
Whether the tests run in an app of the matrix.
final
devDependencies → List<String>
The packages that the tests use besides those of the app, which the matrix adds to the app as dev dependencies, such as the mocks of the platform side of a plugin.
final
directory → String
The directory of the files that go into an app, each at its path relative to the directory, such as test/firebase_core_test.dart, over the file of the app at that path, if the app has one.
final
generatedFiles → Map<String, String> Function(MatrixApp app, String packageName)?
The files that the matrix generates for the tests in an app of the matrix, next to the files of directory, or null if they need none: the text of each by its path in the app, such as integration_test/di_role/registered_services.dart, for the app and the name of its package, which the imports of the files of the app take, as package:<name>/.... The matrix writes them as they are, with no placeholder filled.
final
hashCode → int
The hash code for this object.
no setterinherited
mocks → MatrixMocks?
The mocks of the platform side of what the module of the tests runs in an app, such as its part of the start-up of the app and its services, or null if it needs none.
final
readsStartProbes → bool
Whether the tests run the probes of the tests of the app (startProbe), as the start check does once the first screen of the app settled: with such tests, the matrix writes the list of the probes of the tests that it adds to the app, startProbesFile, which they import.
final
roles → Set<Role<Object>>
The roles whose contract the tests check, whichever module provides each, such as the router role, whose provider calls the listeners of the screen once for each screen the user sees.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
startProbe → MatrixStartProbe?
The probe of the tests for a check that runs on a device, such as the start check, or null if they have none: a function that goes through what the tests check in the running app, without a test framework, and returns what is wrong, such as the walk of the routes of the app.
final
values → Map<String, String> Function(MatrixApp app)?
The values of the placeholders of the files in an app of the matrix, besides app_name.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited