Skip to content

Commit

Permalink
Fix WP status button preview
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverguenther committed Feb 26, 2025
1 parent cdf4c7b commit 108f8ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/views/layouts/component_preview.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ See COPYRIGHT and LICENSE files for more details.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%= include_frontend_assets %>
<%= stylesheet_link_tag "/highlighting/styles/#{Time.current.iso8601}",
media: :all,
skip_pipeline: true %>
</head>
<%
styles = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ class StatusButtonComponentPreview < ViewComponent::Preview
# @param size [Symbol] select [small, medium, large]
def playground(readonly: true, size: :medium)
user = FactoryBot.build_stubbed(:admin)
render(WorkPackages::StatusButtonComponent.new(work_package: WorkPackage.visible.first,
work_package = FactoryBot.build_stubbed(:work_package, status: Status.first)
render(WorkPackages::StatusButtonComponent.new(work_package:,
user:,
readonly:,
button_arguments: { size: }))
Expand Down

0 comments on commit 108f8ed

Please sign in to comment.