From 6d9cc0e2359326172783167c4e2c3d6d823f2dd0 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Thu, 29 Apr 2021 16:14:59 +0200 Subject: [PATCH 1/3] MOBILE-3738 navigation: Fix nested split-views --- src/core/classes/page-items-list-manager.ts | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/core/classes/page-items-list-manager.ts b/src/core/classes/page-items-list-manager.ts index d7f4afd20..bd374577a 100644 --- a/src/core/classes/page-items-list-manager.ts +++ b/src/core/classes/page-items-list-manager.ts @@ -154,12 +154,10 @@ export abstract class CorePageItemsListManager { // Navigate to item. const params = this.getItemQueryParams(item); + const reset = this.resetNavigation(); const pathPrefix = selectedItemPath ? selectedItemPath.split('/').fill('../').join('') : ''; - await CoreNavigator.navigate(pathPrefix + itemPath, { - params, - reset: CoreScreen.isTablet, - }); + await CoreNavigator.navigate(pathPrefix + itemPath, { params, reset }); } /** @@ -200,6 +198,19 @@ export abstract class CorePageItemsListManager { : null; } + /** + * Check whether to reset navigation when selecting an item. + * + * @returns boolean Whether navigation should be reset. + */ + protected resetNavigation(): boolean { + if (!CoreScreen.isTablet) { + return false; + } + + return !this.splitView?.isNested; + } + /** * Get the item that should be selected by default. */ From 869c0587e6e9c2f2c5d3403433c3c09382ee21fa Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Thu, 29 Apr 2021 16:15:44 +0200 Subject: [PATCH 2/3] MOBILE-3738 ci: Configure e2e tests --- .github/workflows/e2e.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/e2e.yml diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml new file mode 100644 index 000000000..e3d9182f3 --- /dev/null +++ b/.github/workflows/e2e.yml @@ -0,0 +1,28 @@ +name: E2E + +on: [push, pull_request] + +jobs: + e2e: + runs-on: ubuntu-latest + env: + MOODLE_DOCKER_DB: pgsql + MOODLE_DOCKER_BROWSER: chrome + MOODLE_DOCKER_PHP_VERSION: 7.3 + steps: + - uses: actions/checkout@v2 + - name: Use Node.js + uses: actions/setup-node@v1 + with: + node-version: '12.x' + - run: npm ci + - run: git clone --branch master --depth 1 git://github.com/moodle/moodle $GITHUB_WORKSPACE/moodle + - run: git clone --branch ionic5 --depth 1 git://github.com/NoelDeMartin/moodle-local_moodlemobileapp $GITHUB_WORKSPACE/moodle/local/moodlemobileapp + - run: git clone --branch MOBILE-3738 --depth 1 git://github.com/NoelDeMartin/moodle-docker $GITHUB_WORKSPACE/moodle-docker + - run: cp $GITHUB_WORKSPACE/moodle-docker/config.docker-template.php $GITHUB_WORKSPACE/moodle/config.php + - run: MOODLE_DOCKER_WWWROOT=$GITHUB_WORKSPACE/moodle MOODLE_DOCKER_APP_PATH=$GITHUB_WORKSPACE $GITHUB_WORKSPACE/moodle-docker/bin/moodle-docker-compose pull + - run: MOODLE_DOCKER_WWWROOT=$GITHUB_WORKSPACE/moodle MOODLE_DOCKER_APP_PATH=$GITHUB_WORKSPACE $GITHUB_WORKSPACE/moodle-docker/bin/moodle-docker-compose up -d + - run: MOODLE_DOCKER_WWWROOT=$GITHUB_WORKSPACE/moodle MOODLE_DOCKER_APP_PATH=$GITHUB_WORKSPACE $GITHUB_WORKSPACE/moodle-docker/bin/moodle-docker-wait-for-db + - run: MOODLE_DOCKER_WWWROOT=$GITHUB_WORKSPACE/moodle MOODLE_DOCKER_APP_PATH=$GITHUB_WORKSPACE $GITHUB_WORKSPACE/moodle-docker/bin/moodle-docker-wait-for-app + - run: MOODLE_DOCKER_WWWROOT=$GITHUB_WORKSPACE/moodle MOODLE_DOCKER_APP_PATH=$GITHUB_WORKSPACE $GITHUB_WORKSPACE/moodle-docker/bin/moodle-docker-compose exec -T webserver sh -c "php admin/tool/behat/cli/init.php" + - run: MOODLE_DOCKER_WWWROOT=$GITHUB_WORKSPACE/moodle MOODLE_DOCKER_APP_PATH=$GITHUB_WORKSPACE $GITHUB_WORKSPACE/moodle-docker/bin/moodle-docker-compose exec -T webserver sh -c "php admin/tool/behat/cli/run.php --tags="@app" --auto-rerun" From b0616a1ef83ab03e2462ca572b8225ea08716431 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Mon, 3 May 2021 11:25:53 +0200 Subject: [PATCH 3/3] MOBILE-3738 a11y: Show course category --- .github/workflows/e2e.yml | 2 +- .../course-progress/core-courses-course-progress.html | 3 ++- src/core/features/courses/lang.json | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index e3d9182f3..917bdc39a 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -17,7 +17,7 @@ jobs: node-version: '12.x' - run: npm ci - run: git clone --branch master --depth 1 git://github.com/moodle/moodle $GITHUB_WORKSPACE/moodle - - run: git clone --branch ionic5 --depth 1 git://github.com/NoelDeMartin/moodle-local_moodlemobileapp $GITHUB_WORKSPACE/moodle/local/moodlemobileapp + - run: git clone --branch ionic5 --depth 1 git://github.com/moodlehq/moodle-local_moodlemobileapp $GITHUB_WORKSPACE/moodle/local/moodlemobileapp - run: git clone --branch MOBILE-3738 --depth 1 git://github.com/NoelDeMartin/moodle-docker $GITHUB_WORKSPACE/moodle-docker - run: cp $GITHUB_WORKSPACE/moodle-docker/config.docker-template.php $GITHUB_WORKSPACE/moodle/config.php - run: MOODLE_DOCKER_WWWROOT=$GITHUB_WORKSPACE/moodle MOODLE_DOCKER_APP_PATH=$GITHUB_WORKSPACE $GITHUB_WORKSPACE/moodle-docker/bin/moodle-docker-compose pull diff --git a/src/core/features/courses/components/course-progress/core-courses-course-progress.html b/src/core/features/courses/components/course-progress/core-courses-course-progress.html index 9680c3d8a..508bcf80f 100644 --- a/src/core/features/courses/components/course-progress/core-courses-course-progress.html +++ b/src/core/features/courses/components/course-progress/core-courses-course-progress.html @@ -11,7 +11,8 @@ [class.core-course-with-buttons]="courseOptionMenuEnabled || (downloadCourseEnabled && showDownload)" [class.core-course-with-spinner]="(downloadCourseEnabled && prefetchCourseData.icon == 'spinner') || showSpinner">