MOBILE-4047 behat: General checks to blocking UI

main
Pau Ferrer Ocaña 2022-07-13 11:07:57 +02:00
parent 7aa6eb48f1
commit 538bfd6ceb
7 changed files with 10 additions and 7 deletions

View File

@ -49,7 +49,6 @@ Feature: Timeline block.
@lms_from3.11 @lms_from3.11
Scenario: See courses inside block Scenario: See courses inside block
Given I entered the app as "student1" Given I entered the app as "student1"
And I press "Open block drawer" in the app
Then I should find "Assignment 00" within "Timeline" "ion-card" in the app Then I should find "Assignment 00" within "Timeline" "ion-card" in the app
And I should find "Assignment 02" within "Timeline" "ion-card" in the app And I should find "Assignment 02" within "Timeline" "ion-card" in the app
And I should find "Assignment 05" within "Timeline" "ion-card" in the app And I should find "Assignment 05" within "Timeline" "ion-card" in the app

View File

@ -63,6 +63,7 @@ Feature: Users can store entries in database activities when offline and sync wh
And I press "Information" in the app And I press "Information" in the app
And I press "Download" in the app And I press "Download" in the app
And I wait until the page is ready And I wait until the page is ready
And I close the popup in the app
And I switch network connection to offline And I switch network connection to offline
When I press "Edit" in the app When I press "Edit" in the app
And I set the following fields to these values in the app: And I set the following fields to these values in the app:
@ -112,6 +113,7 @@ Feature: Users can store entries in database activities when offline and sync wh
And I press "Information" in the app And I press "Information" in the app
And I press "Download" in the app And I press "Download" in the app
And I wait until the page is ready And I wait until the page is ready
And I close the popup in the app
When I switch network connection to offline When I switch network connection to offline
And I press "Delete" in the app And I press "Delete" in the app
And I should find "Are you sure you want to delete this entry?" in the app And I should find "Are you sure you want to delete this entry?" in the app

View File

@ -36,6 +36,7 @@ Feature: Test basic usage of comments in app
| Field description | Test field description | | Field description | Test field description |
And I press "Save" And I press "Save"
And I close the browser tab opened by the app And I close the browser tab opened by the app
And I close the popup in the app
When I pull to refresh in the app When I pull to refresh in the app
And I press "Add entries" in the app And I press "Add entries" in the app
@ -84,6 +85,7 @@ Feature: Test basic usage of comments in app
| Field description | Test field description | | Field description | Test field description |
And I press "Save" And I press "Save"
And I close the browser tab opened by the app And I close the browser tab opened by the app
And I close the popup in the app
When I pull to refresh in the app When I pull to refresh in the app
And I press "Add entries" in the app And I press "Add entries" in the app

View File

@ -411,6 +411,7 @@ Feature: Test basic usage of one course in app
And I select "Enrolment methods" from the "jump" singleselect And I select "Enrolment methods" from the "jump" singleselect
And I click on "Enable" "icon" in the "Self enrolment (Student)" "table_row" And I click on "Enable" "icon" in the "Self enrolment (Student)" "table_row"
And I close the browser tab opened by the app And I close the browser tab opened by the app
And I close the popup in the app
Given I entered the app as "student2" Given I entered the app as "student2"
When I press "Site home" in the app When I press "Site home" in the app

View File

@ -1,7 +1,7 @@
:host { :host {
--popover-background: var(--ion-overlay-background-color, var(--ion-background-color, #fff)); --popover-background: var(--ion-overlay-background-color, var(--ion-background-color, #fff));
z-index: 99; z-index: 105; // Main menu is 101.
width: 100%; width: 100%;
height: 100%; height: 100%;
display: none; display: none;

View File

@ -62,6 +62,7 @@ export class CoreUserToursUserTourComponent implements AfterViewInit, OnDestroy
@Output() afterDismiss = new EventEmitter<void>(); @Output() afterDismiss = new EventEmitter<void>();
@HostBinding('class.is-active') active = false; @HostBinding('class.is-active') active = false;
@HostBinding('class.is-popover') popover = false; @HostBinding('class.is-popover') popover = false;
@HostBinding('class.backdrop') backdrop = true;
@ViewChild('wrapper') wrapper?: ElementRef<HTMLElement>; @ViewChild('wrapper') wrapper?: ElementRef<HTMLElement>;
focusStyles?: string; focusStyles?: string;

View File

@ -18,9 +18,6 @@ import { CoreUtils } from '@services/utils/utils';
import { makeSingleton, NgZone } from '@singletons'; import { makeSingleton, NgZone } from '@singletons';
import { TestingBehatElementLocator, TestingBehatFindOptions } from './behat-runtime'; import { TestingBehatElementLocator, TestingBehatFindOptions } from './behat-runtime';
// Containers that block containers behind them.
const blockingContainers = ['ION-ALERT', 'ION-POPOVER', 'ION-ACTION-SHEET', 'CORE-USER-TOURS-USER-TOUR', 'ION-PAGE'];
/** /**
* Behat Dom Utils helper functions. * Behat Dom Utils helper functions.
*/ */
@ -331,13 +328,14 @@ export class TestingBehatDomUtilsService {
} }
// Get containers until one blocks other views. // Get containers until one blocks other views.
containers.find(container => { containers.some(container => {
if (container.tagName === 'ION-TOAST') { if (container.tagName === 'ION-TOAST') {
container = container.shadowRoot?.querySelector('.toast-container') || container; container = container.shadowRoot?.querySelector('.toast-container') || container;
} }
topContainers.push(container); topContainers.push(container);
return blockingContainers.includes(container.tagName); // If container has backdrop it blocks the rest of the UI.
return container.querySelector(':scope > ion-backdrop') || container.classList.contains('backdrop');
}); });
return topContainers; return topContainers;