Make Settings a first-class destination
Keep Settings location, selection, history, and persistence separate from Pipelines so /settings restores and navigates independently. Update focused navigation coverage and defer notification loading to avoid a mid-build Runs-tab update.
This commit is contained in:
@@ -55,16 +55,23 @@ void main() {
|
||||
expect(history.tabs, [AppDestination.pipelines, AppDestination.chat]);
|
||||
});
|
||||
|
||||
test('a page counts as its tab, and Back builds no forward trail', () {
|
||||
test('Settings is its own entry, and Back builds no forward trail', () {
|
||||
final history = TabHistory();
|
||||
history.record(AppDestination.runs, AppDestination.pipelines);
|
||||
history.record(AppDestination.pipelines, AppDestination.settings);
|
||||
expect(history.tabs, [AppDestination.runs]);
|
||||
history.record(AppDestination.settings, AppDestination.chat);
|
||||
expect(history.tabs, [AppDestination.pipelines, AppDestination.runs]);
|
||||
history.record(AppDestination.settings, AppDestination.chat);
|
||||
expect(history.tabs, [
|
||||
AppDestination.settings,
|
||||
AppDestination.pipelines,
|
||||
AppDestination.runs,
|
||||
]);
|
||||
|
||||
expect(history.takePrevious(), AppDestination.settings);
|
||||
history.record(AppDestination.chat, AppDestination.settings);
|
||||
expect(history.tabs, [AppDestination.pipelines, AppDestination.runs]);
|
||||
expect(history.takePrevious(), AppDestination.pipelines);
|
||||
history.record(AppDestination.chat, AppDestination.pipelines);
|
||||
history.record(AppDestination.settings, AppDestination.pipelines);
|
||||
expect(history.tabs, [AppDestination.runs]);
|
||||
expect(history.takePrevious(), AppDestination.runs);
|
||||
history.record(AppDestination.pipelines, AppDestination.runs);
|
||||
@@ -248,9 +255,8 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
_expectShown(AppDestination.settings);
|
||||
|
||||
// Settings closes to Pipelines first, as it always has.
|
||||
await _back(tester);
|
||||
expect(router.route, AppRoute.pipelines);
|
||||
// Settings is a destination of its own: Back returns to the one opened
|
||||
// before it, chat, then runs, then the platform.
|
||||
await _back(tester);
|
||||
expect(router.route.kind, AppRouteKind.chat);
|
||||
await _back(tester);
|
||||
|
||||
Reference in New Issue
Block a user