diff --git a/src/addons/mod/data/tests/behat/entries.feature b/src/addons/mod/data/tests/behat/entries.feature index 2b7d90c5f..f252cdd40 100644 --- a/src/addons/mod/data/tests/behat/entries.feature +++ b/src/addons/mod/data/tests/behat/entries.feature @@ -26,7 +26,6 @@ Feature: Users can manage entries in database activities | data1 | text | URL | URL link | | data1 | text | Description | Link description | - @ionic7_failure Scenario: Create entry Given I entered the data activity "Web links" on course "Course 1" as "student1" in the app Then I should find "No entries yet" in the app @@ -38,7 +37,6 @@ Feature: Users can manage entries in database activities Then I should find "https://moodle.org/" in the app And I should find "Moodle community site" in the app - @ionic7_failure Scenario: Browse entry Given I entered the data activity "Web links" on course "Course 1" as "student1" in the app @@ -72,7 +70,6 @@ Feature: Users can manage entries in database activities And I should find "Moodle community site" in the app And I should find "Moodle Cloud" in the app - @ionic7_failure Scenario: Students can not edit or delete other user's entries from list and single view in the app Given I entered the data activity "Web links" on course "Course 1" as "student1" in the app And I press "Add entries" in the app @@ -88,7 +85,6 @@ Feature: Users can manage entries in database activities And "Edit" "link" should not exist And "Delete" "link" should not exist - @ionic7_failure Scenario: Delete entry (student) & Update entry (student) Given I entered the data activity "Web links" on course "Course 1" as "student1" in the app And I press "Add entries" in the app @@ -148,7 +144,6 @@ Feature: Users can manage entries in database activities And I should not find "Moodle Cloud" in the app And I should find "No entries yet" in the app - @ionic7_failure Scenario: Delete entry (teacher) & Update entry (teacher) Given I entered the data activity "Web links" on course "Course 1" as "student1" in the app And I press "Add entries" in the app @@ -212,7 +207,6 @@ Feature: Users can manage entries in database activities And I press "Delete" in the app And I should not find "Moodle Cloud" in the app - @ionic7_failure Scenario: Handle number 0 correctly when creating entries Given the following "activities" exist: | activity | name | intro | course | idnumber | diff --git a/src/addons/mod/data/tests/behat/sync.feature b/src/addons/mod/data/tests/behat/sync.feature index 1ff9d51c9..a9aee09c5 100644 --- a/src/addons/mod/data/tests/behat/sync.feature +++ b/src/addons/mod/data/tests/behat/sync.feature @@ -26,7 +26,6 @@ Feature: Users can store entries in database activities when offline and sync wh | data1 | text | URL | URL link | | data1 | text | Description | Link description | - @ionic7_failure Scenario: Create entry (offline) Given I entered the data activity "Web links" on course "Course 1" as "student1" in the app And I switch network connection to offline @@ -46,7 +45,6 @@ Feature: Users can store entries in database activities when offline and sync wh And I should find "Moodle community site" in the app And I should not find "This Database has offline data to be synchronised" in the app - @ionic7_failure Scenario: Update entry (offline) & Delete entry (offline) Given I entered the data activity "Web links" on course "Course 1" as "student1" in the app And I should find "No entries yet" in the app @@ -97,7 +95,6 @@ Feature: Users can store entries in database activities when offline and sync wh And I should not find "Moodle Cloud" in the app And I should not find "This Database has offline data to be synchronised" in the app - @ionic7_failure Scenario: Students can undo deleting entries to a database in the app while offline Given I entered the data activity "Web links" on course "Course 1" as "student1" in the app And I should find "No entries yet" in the app diff --git a/src/core/features/comments/tests/behat/basic_usage.feature b/src/core/features/comments/tests/behat/basic_usage.feature index e80df0483..dfd04c1cf 100644 --- a/src/core/features/comments/tests/behat/basic_usage.feature +++ b/src/core/features/comments/tests/behat/basic_usage.feature @@ -26,7 +26,6 @@ Feature: Test basic usage of comments in app | database | type | name | description | | data1 | text | Test field name | Test field description | - @ionic7_failure Scenario: Add comments & Delete comments (database) # Create database entry and comment as a teacher Given I entered the data activity "Data" on course "Course 1" as "teacher1" in the app @@ -65,7 +64,6 @@ Feature: Test basic usage of comments in app When I press the back button in the app Then I should find "Comments (1)" in the app - @ionic7_failure Scenario: Add comments offline & Delete comments offline & Sync comments (database) Given I entered the data activity "Data" on course "Course 1" as "teacher1" in the app And I press "Add entries" in the app diff --git a/src/core/features/compile/components/compile-html/compile-html.ts b/src/core/features/compile/components/compile-html/compile-html.ts index 4ac7ea86b..4b9a51ab1 100644 --- a/src/core/features/compile/components/compile-html/compile-html.ts +++ b/src/core/features/compile/components/compile-html/compile-html.ts @@ -114,42 +114,41 @@ export class CoreCompileHtmlComponent implements OnChanges, OnDestroy, DoCheck { * @inheritdoc */ async ngOnChanges(changes: Record): Promise { - if (!this.container) { + // Only compile if text/javascript has changed or the forceCompile flag has been set to true. + if (this.text === undefined || + !(changes.text || changes.javascript || (changes.forceCompile && CoreUtils.isTrueOrOne(this.forceCompile)))) { return; } - // Only compile if text/javascript has changed or the forceCompile flag has been set to true. - if (this.text !== undefined && (changes.text || changes.javascript || - (changes.forceCompile && CoreUtils.isTrueOrOne(this.forceCompile)))) { + // Create a new component and a new module. + this.creatingComponent = true; + this.compiling.emit(true); - // Create a new component and a new module. - this.creatingComponent = true; - this.compiling.emit(true); + try { + const componentClass = await this.getComponentClass(); - try { - const componentClass = await this.getComponentClass(); + // Destroy previous components. + this.componentRef?.destroy(); - // Destroy previous components. - this.componentRef?.destroy(); - - // Create the component. + // Create the component. + if (this.container) { this.componentRef = await CoreCompile.createAndCompileComponent( this.text, componentClass, this.container, this.extraImports, ); - this.componentRef && this.created.emit(this.componentRef.instance); - - this.loaded = true; - } catch (error) { - CoreDomUtils.showErrorModal(error); - - this.loaded = true; - } finally { - this.creatingComponent = false; - this.compiling.emit(false); } + this.componentRef && this.created.emit(this.componentRef.instance); + + this.loaded = true; + } catch (error) { + CoreDomUtils.showErrorModal(error); + + this.loaded = true; + } finally { + this.creatingComponent = false; + this.compiling.emit(false); } }