Skip to content

Commit

Permalink
fix(web): fixes from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
dgdavid committed Sep 5, 2024
1 parent ed0025a commit 18b48cc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion service/lib/agama/software/product.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Product
attr_accessor :version

# Product icon. Please use specify filename with svg suffix and ensure referenced
# file exists inside agama/web/src/assests/product.
# file exists inside agama/web/src/assets/product.
# `default.svg` will be used unless specified otherwise.
#
# @return [String] E.g. "leap.svg"
Expand Down
11 changes: 5 additions & 6 deletions service/package/rubygem-agama-yast.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Sep 5 16:25:00 UTC 2024 - Lubos Kocman <[email protected]>

- Show product logo in product selector (gh#openSUSE/agama#1415).

-------------------------------------------------------------------
Wed Sep 4 08:55:29 UTC 2024 - José Iván López González <[email protected]>

Expand Down Expand Up @@ -27,12 +32,6 @@ Mon Aug 26 10:01:27 UTC 2024 - Imobach Gonzalez Sosa <[email protected]>
- Do not depend on f2fs-tools and nilfs-utils
(jsc#PED-8669, gh#openSUSE/agama#1554).

-------------------------------------------------------------------
Wed Aug 21 19:07:28 UTC 2024 - Lubos Kocman <[email protected]>

- Add product icons. Resolves Issue #1415
Not setting any icon will default to default.svg icon

-------------------------------------------------------------------
Mon Aug 19 15:13:46 UTC 2024 - Lubos Kocman <[email protected]>

Expand Down
12 changes: 6 additions & 6 deletions web/src/components/core/ChangeProductLink.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ import { PATHS } from "~/routes/products";
import { Product } from "~/types/software";
import ChangeProductLink from "./ChangeProductLink";

const tumbleweedProduct = {
const tumbleweed: Product = {
id: "Tumbleweed",
name: "openSUSE Tumbleweed",
icon: "tumbleweed.svg",
description: "Tumbleweed description...",
icon: "Tumbleweed.icon",
};
const microosProduct = {
const microos: Product = {
id: "MicroOS",
name: "openSUSE MicroOS",
icon: "MicroOS.svg",
description: "MicroOS description",
icon: "MicroOS.icon",
};

let mockUseProduct: { products: Product[]; selectedProduct?: Product };
Expand All @@ -48,7 +48,7 @@ jest.mock("~/queries/software", () => ({
describe("ChangeProductLink", () => {
describe("when there is more than one product available", () => {
beforeEach(() => {
mockUseProduct = { products: [tumbleweedProduct, microosProduct] };
mockUseProduct = { products: [tumbleweed, microos] };
});

it("renders a link for navigating to product selection page", () => {
Expand All @@ -60,7 +60,7 @@ describe("ChangeProductLink", () => {

describe("when there is only one product available", () => {
beforeEach(() => {
mockUseProduct = { products: [tumbleweedProduct] };
mockUseProduct = { products: [tumbleweed] };
});

it("renders nothing", () => {
Expand Down

0 comments on commit 18b48cc

Please sign in to comment.