Skip to content

Commit

Permalink
Merge pull request #790 from puzzle/feature/768-fix-pipeline
Browse files Browse the repository at this point in the history
Re-enable and fix pipeline
  • Loading branch information
mtnstar authored Jun 24, 2024
2 parents 1d54ffc + dfd5fba commit 72f1421
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 47 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.3.4
5.3.5
1 change: 0 additions & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/components/encryptable/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
49 changes: 27 additions & 22 deletions frontend/app/templates/components/encryptable/form.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -37,34 +37,39 @@
</div>
<div class="col-md-6 order-2">
<div class="form-group col-md-12" id="team-power-select">
<form.element id="encryptable-form-team" @label={{t "team"}} @controlType="power-select"
@options={{this.assignableTeams}} @value={{this.selectedTeam}}
@customError={{t (validation-error-key this.changeset.error.team.validation)}} as |el|>
<el.control class={{if this.changeset.error.team.validation "invalid-input-ps"}} @placeholder={{t
"encryptable/credentials.edit.team_placeholder"}}
@renderInPlace={{true}} @onChange={{this.setSelectedTeam}} as |team|>
{{#if team.isPersonalTeam }}
<label for="encryptable-form-team"> {{t "team"}}</label>
<PowerSelect
id="encryptable-form-team"
@selected={{this.selectedTeam}}
@renderInPlace="true"
@options={{this.assignableTeams}}
@placeholder={{t "encryptable/credentials.edit.team_placeholder"}}
@onChange={{this.setSelectedTeam}}
as |team|>
{{#if team.isPersonalTeam }}
{{this.userService.username}}
{{else}}
{{team.name}}
{{/if}}
</el.control>
</form.element>
</PowerSelect>
</div>
<div class="form-group col-md-12" id="folder-power-select">
<form.element id="encryptable-form-folder" if="encryptable-form-folder"
@options={{this.availableFolders}} @label={{t "folder"}} @controlType="power-select"
@value={{this.selectedFolder}}
@searchEnabled={{true}} @allowClear={{true}} @searchField={{"name"}}
@customError={{t (validation-error-key this.changeset.error.folder.validation)}} as
|el|>
<el.control class={{if this.changeset.error.folder.validation "invalid-input-ps"}}
@disabled={{this.isFolderDropdownDisabled}}
@placeholder={{t "encryptable/credentials.edit.folder_placeholder"}}
@renderInPlace={{true}} @onChange={{this.setFolder}} as |folder|>
{{folder.name}}
</el.control>
</form.element>

<label for="encryptable-form-folder"> {{t "folder"}}</label>
<PowerSelect
id="encryptable-form-folder"
@searchEnabled="true"
@searchField="name"
@selected={{this.selectedFolder}}
@options={{this.availableFolders}}
@allowClear={{true}}
@disabled={{this.isFolderDropdownDisabled}}
@placeholder={{t "encryptable/credentials.edit.folder_placeholder"}}
@renderInPlace={{true}}
@onChange={{this.setFolder}}
as |folder|>
{{folder.name}}
</PowerSelect>
</div>
</div>
</div>
Expand Down
42 changes: 22 additions & 20 deletions frontend/tests/integration/components/encryptable/form-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand All @@ -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"
);
Expand All @@ -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"
);
Expand All @@ -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(
Expand Down Expand Up @@ -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(
Expand All @@ -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"
);
Expand All @@ -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(
Expand Down Expand Up @@ -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"
);
Expand All @@ -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"
);
Expand All @@ -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(
Expand Down Expand Up @@ -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"
);
Expand All @@ -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"
);
Expand All @@ -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(
Expand Down

0 comments on commit 72f1421

Please sign in to comment.