MOBILE-3947 messages: Fix tests
parent
44606242fd
commit
2200669b0f
|
@ -280,7 +280,6 @@ Feature: Test basic usage of messages in app
|
||||||
Then I should find "Teacher teacher" in the app
|
Then I should find "Teacher teacher" in the app
|
||||||
And I should find "Student1 student1" in the app
|
And I should find "Student1 student1" in the app
|
||||||
|
|
||||||
@ionic7_failure
|
|
||||||
Scenario: User blocking feature
|
Scenario: User blocking feature
|
||||||
Given I entered the course "Course 1" as "student2" in the app
|
Given I entered the course "Course 1" as "student2" in the app
|
||||||
When I press "Participants" in the app
|
When I press "Participants" in the app
|
||||||
|
@ -318,7 +317,6 @@ Feature: Test basic usage of messages in app
|
||||||
Then I should find "test message" in the app
|
Then I should find "test message" in the app
|
||||||
But I should not find "You are unable to message this user" in the app
|
But I should not find "You are unable to message this user" in the app
|
||||||
|
|
||||||
@ionic7_failure
|
|
||||||
Scenario: Mute Unmute conversations
|
Scenario: Mute Unmute conversations
|
||||||
Given I entered the course "Course 1" as "student1" in the app
|
Given I entered the course "Course 1" as "student1" in the app
|
||||||
When I press "Participants" in the app
|
When I press "Participants" in the app
|
||||||
|
|
|
@ -169,6 +169,20 @@ export function conditionalRoutes(routes: Routes, condition: () => boolean): Rou
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check whether a route does not have any content.
|
||||||
|
*
|
||||||
|
* @param route Route.
|
||||||
|
* @returns Whether the route doesn't have any content.
|
||||||
|
*/
|
||||||
|
export function isEmptyRoute(route: Route): boolean {
|
||||||
|
return !('component' in route)
|
||||||
|
&& !('loadComponent' in route)
|
||||||
|
&& !('children' in route)
|
||||||
|
&& !('loadChildren' in route)
|
||||||
|
&& !('redirectTo' in route);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resolve module routes.
|
* Resolve module routes.
|
||||||
*
|
*
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
import { InjectionToken, Injector, ModuleWithProviders, NgModule } from '@angular/core';
|
import { InjectionToken, Injector, ModuleWithProviders, NgModule } from '@angular/core';
|
||||||
import { Route, Routes } from '@angular/router';
|
import { Route, Routes } from '@angular/router';
|
||||||
|
|
||||||
import { ModuleRoutesConfig, resolveModuleRoutes } from '@/app/app-routing.module';
|
import { ModuleRoutesConfig, isEmptyRoute, resolveModuleRoutes } from '@/app/app-routing.module';
|
||||||
|
|
||||||
const MAIN_MENU_TAB_ROUTES = new InjectionToken('MAIN_MENU_TAB_ROUTES');
|
const MAIN_MENU_TAB_ROUTES = new InjectionToken('MAIN_MENU_TAB_ROUTES');
|
||||||
const modulesPaths: Record<string, Set<string>> = {};
|
const modulesPaths: Record<string, Set<string>> = {};
|
||||||
|
@ -71,6 +71,8 @@ export function buildTabMainRoutes(injector: Injector, mainRoute: Route): Routes
|
||||||
if (isRootRoute && !('redirectTo' in mainRoute)) {
|
if (isRootRoute && !('redirectTo' in mainRoute)) {
|
||||||
mainRoute.children = mainRoute.children || [];
|
mainRoute.children = mainRoute.children || [];
|
||||||
mainRoute.children = mainRoute.children.concat(routes.children);
|
mainRoute.children = mainRoute.children.concat(routes.children);
|
||||||
|
} else if (isEmptyRoute(mainRoute)) {
|
||||||
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
return isRootRoute
|
return isRootRoute
|
||||||
|
|
Loading…
Reference in New Issue