From 1bd7a9fad05533407131aaf10d772ddfa30cb9ff Mon Sep 17 00:00:00 2001 From: Yanick Minder Date: Tue, 11 Jun 2024 13:15:13 +0200 Subject: [PATCH 1/4] Fix translation tests --- frontend/app/components/encryptable/form.js | 2 +- .../templates/components/encryptable/form.hbs | 49 ++++++++++--------- .../components/encryptable/form-test.js | 42 ++++++++-------- 3 files changed, 50 insertions(+), 43 deletions(-) diff --git a/frontend/app/components/encryptable/form.js b/frontend/app/components/encryptable/form.js index c6fe764eb..4336517b5 100644 --- a/frontend/app/components/encryptable/form.js +++ b/frontend/app/components/encryptable/form.js @@ -90,7 +90,7 @@ export default class Form extends BaseFormComponent { } get availableFolders() { - return this.store.query("folder", { teamId: this.selectedTeam.get("id")}) + return this.store.query("folder", { teamId: this.selectedTeam?.get("id")}) } @action diff --git a/frontend/app/templates/components/encryptable/form.hbs b/frontend/app/templates/components/encryptable/form.hbs index 6748d85ea..15ce6b888 100644 --- a/frontend/app/templates/components/encryptable/form.hbs +++ b/frontend/app/templates/components/encryptable/form.hbs @@ -37,34 +37,39 @@
- - - {{#if team.isPersonalTeam }} + + + {{#if team.isPersonalTeam }} {{this.userService.username}} {{else}} {{team.name}} {{/if}} - - +
- - - {{folder.name}} - - + + + + {{folder.name}} +
diff --git a/frontend/tests/integration/components/encryptable/form-test.js b/frontend/tests/integration/components/encryptable/form-test.js index fa3c79eb6..942d654b5 100644 --- a/frontend/tests/integration/components/encryptable/form-test.js +++ b/frontend/tests/integration/components/encryptable/form-test.js @@ -98,8 +98,10 @@ module("Integration | Component | encryptable/form", function (hooks) { hooks.beforeEach(function () { this.owner.unregister("service:store"); - this.owner.register("service:store", storeStub); this.owner.unregister("service:navService"); + this.owner.unregister("service:userService"); + + this.owner.register("service:store", storeStub); this.owner.register("service:navService", navServiceStub); this.owner.register("service:userService", userServiceStub); }); @@ -111,7 +113,7 @@ module("Integration | Component | encryptable/form", function (hooks) { assert.equal( this.element - .querySelector("#encryptable-form-team") + .querySelector("#team-power-select") .innerText.replace(/\s+/g, " "), "Team Select a Team" ); @@ -123,7 +125,7 @@ module("Integration | Component | encryptable/form", function (hooks) { assert.equal( this.element - .querySelector("#encryptable-form-team") + .querySelector("#team-power-select") .innerText.replace(/\s+/g, " "), "Team bbteam" ); @@ -135,9 +137,9 @@ module("Integration | Component | encryptable/form", function (hooks) { assert.equal( this.element - .querySelector("#encryptable-form-folder") + .querySelector("#folder-power-select") .innerText.replace(/\s+/g, " "), - "Folder bbt" + "Folder bbt ×" ); assert.equal( @@ -175,9 +177,9 @@ module("Integration | Component | encryptable/form", function (hooks) { assert.equal( this.element - .querySelector("#encryptable-form-team") + .querySelector("#team-power-select") .innerText.replace(/\s+/g, " "), - "Team Wählen Sie ein Team aus" + "Team Wähle ein Team aus" ); await selectChoose( @@ -187,7 +189,7 @@ module("Integration | Component | encryptable/form", function (hooks) { assert.equal( this.element - .querySelector("#encryptable-form-team") + .querySelector("#team-power-select") .innerText.replace(/\s+/g, " "), "Team bbteam" ); @@ -199,9 +201,9 @@ module("Integration | Component | encryptable/form", function (hooks) { assert.equal( this.element - .querySelector("#encryptable-form-folder") + .querySelector("#folder-power-select") .innerText.replace(/\s+/g, " "), - "Ordner bbt" + "Ordner bbt ×" ); assert.equal( @@ -239,7 +241,7 @@ module("Integration | Component | encryptable/form", function (hooks) { assert.equal( this.element - .querySelector("#encryptable-form-team") + .querySelector("#team-power-select") .innerText.replace(/\s+/g, " "), "Team Wähl äs Team us" ); @@ -251,14 +253,14 @@ module("Integration | Component | encryptable/form", function (hooks) { assert.equal( this.element - .querySelector("#encryptable-form-team") + .querySelector("#team-power-select") .innerText.replace(/\s+/g, " "), "Team bbteam" ); assert.equal( this.element - .querySelector("#encryptable-form-folder") + .querySelector("#folder-power-select") .innerText.replace(/\s+/g, " "), "Ordner Wähl ä Ordner us" ); @@ -270,9 +272,9 @@ module("Integration | Component | encryptable/form", function (hooks) { assert.equal( this.element - .querySelector("#encryptable-form-folder") + .querySelector("#folder-power-select") .innerText.replace(/\s+/g, " "), - "Ordner bbt" + "Ordner bbt ×" ); assert.equal( @@ -310,7 +312,7 @@ module("Integration | Component | encryptable/form", function (hooks) { assert.equal( this.element - .querySelector("#encryptable-form-team") + .querySelector("#team-power-select") .innerText.replace(/\s+/g, " "), "Équipe Choisissez une équipe" ); @@ -322,14 +324,14 @@ module("Integration | Component | encryptable/form", function (hooks) { assert.equal( this.element - .querySelector("#encryptable-form-team") + .querySelector("#team-power-select") .innerText.replace(/\s+/g, " "), "Équipe bbteam" ); assert.equal( this.element - .querySelector("#encryptable-form-folder") + .querySelector("#folder-power-select") .innerText.replace(/\s+/g, " "), "Dossier Choisissez un dossier" ); @@ -341,9 +343,9 @@ module("Integration | Component | encryptable/form", function (hooks) { assert.equal( this.element - .querySelector("#encryptable-form-folder") + .querySelector("#folder-power-select") .innerText.replace(/\s+/g, " "), - "Dossier bbt" + "Dossier bbt ×" ); assert.equal( From 26951846b6d9eb0365c3fa743369f5adbb661bff Mon Sep 17 00:00:00 2001 From: Yanick Minder Date: Tue, 11 Jun 2024 13:21:12 +0200 Subject: [PATCH 2/4] update bullet to use it with active record 7.1 --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index aea349f49..9ee8b324b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -95,8 +95,8 @@ GEM debug_inspector (>= 0.0.1) bleib (0.0.12) brakeman (5.2.1) - builder (3.3.0) - bullet (7.0.7) + builder (3.2.4) + bullet (7.1.6) activesupport (>= 3.0.0) uniform_notifier (~> 1.11) byebug (11.1.3) From a41c6a9ff4ddc005b3d24f96bef6817afc1fad0c Mon Sep 17 00:00:00 2001 From: Yanick Minder Date: Tue, 11 Jun 2024 13:29:52 +0200 Subject: [PATCH 3/4] remove old call to legacy_connection_handling --- config/application.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index 744034189..5e44dc786 100644 --- a/config/application.rb +++ b/config/application.rb @@ -84,7 +84,6 @@ class Application < Rails::Application # Enable escaping HTML in JSON. config.active_support.escape_html_entities_in_json = true - config.active_record.legacy_connection_handling = false # Use SQL instead of Active Record's schema dumper when creating the database. # This is necessary if your schema can't be completely dumped by the schema dumper, From dfd5fba3296a76276f7bb01fc029987d56a75f95 Mon Sep 17 00:00:00 2001 From: Yanick Minder Date: Tue, 18 Jun 2024 10:07:31 +0200 Subject: [PATCH 4/4] update version --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index e0a61e6a8..e61ecd12d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.3.4 +5.3.5