Skip to content
This repository was archived by the owner on Jul 14, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,13 @@ export default RouteTemplate(
/>

<h1>
{{@controller.model.name}}
<span>{{@controller.model.name}}</span>
{{#unless @controller.editDisabled}}
<a
href
{{on "click" @controller.editName}}
class="edit-query-name"
>
{{icon "pencil"}}
</a>
<DButton
@action={{@controller.editName}}
@icon="pencil"
class="edit-query-name btn-transparent"
/>
{{/unless}}
</h1>
</div>
Expand Down
2 changes: 1 addition & 1 deletion assets/stylesheets/explorer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ table.group-reports {
margin: 0 0.5em 0 0;
color: var(--primary);

a {
button .d-icon {
color: currentcolor;
}
}
Expand Down
10 changes: 10 additions & 0 deletions spec/system/explorer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@

expect(page).to have_field("limit", with: 42)
end

it "allows to edit custom name" do
visit("/admin/plugins/explorer/queries/#{query_1.id}")
find(".query-run .btn-primary").click
find(".edit-query-name").click
find(".name-text-field input").fill_in(with: "My custom name edited")
find(".btn-primary").click
find("button span", text: "Save Changes and Run").click
expect(page.find(".name h1")).to have_content("My custom name edited")
end
end

context "with the old url format" do
Expand Down
2 changes: 1 addition & 1 deletion test/javascripts/acceptance/run-query-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ acceptance("Data Explorer Plugin | Run Query", function (needs) {
await visit("/admin/plugins/explorer/queries/2");

assert
.dom("div.name h1")
.dom("div.name h1 span")
.hasText("What about 0?", "the query name was rendered");

assert
Expand Down