From f5a89e1226ff50e3a6d3ec2a3b22a152af8415a3 Mon Sep 17 00:00:00 2001
From: albertfolch-redeemeum
<102516373+albertfolch-redeemeum@users.noreply.github.com>
Date: Wed, 11 May 2022 10:29:18 +0200
Subject: [PATCH] feat: change Seller info in offer details page & change
description placeholder in create offer page (#27)
* feat: change Seller info in offer details page & change description placeholder in create offer page
* test: fix failing test
---
e2e-tests/OfferDetail.spec.ts | 7 +------
src/pages/create-offer/CreateOffer.tsx | 3 ++-
src/pages/offers/OfferDetail.tsx | 18 +++++++++---------
3 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/e2e-tests/OfferDetail.spec.ts b/e2e-tests/OfferDetail.spec.ts
index 6265bcccb..19c29d43c 100644
--- a/e2e-tests/OfferDetail.spec.ts
+++ b/e2e-tests/OfferDetail.spec.ts
@@ -66,12 +66,7 @@ test.describe("OfferDetail", () => {
const sellerId = await page.locator("[data-testid=seller-id]");
const expectedSellerId =
- "Seller ID: " + expectedOffer.seller?.id || "Unexpected id";
+ "ID: " + expectedOffer.seller?.id || "Unexpected id";
await expect(sellerId).toHaveText(expectedSellerId);
-
- const sellerDescription = await page.locator(
- "[data-testid=seller-description]"
- );
- await expect(sellerDescription).toHaveText("Not defined");
});
});
diff --git a/src/pages/create-offer/CreateOffer.tsx b/src/pages/create-offer/CreateOffer.tsx
index 247b1606f..b9463bb50 100644
--- a/src/pages/create-offer/CreateOffer.tsx
+++ b/src/pages/create-offer/CreateOffer.tsx
@@ -93,7 +93,8 @@ export default function CreateOffer() {
const { values, handleChange, handleSubmit } = useFormik({
initialValues: {
name: "Baggy jeans",
- description: "Lore ipsum",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent in facilisis purus, nec egestas eros. Aliquam dignissim tellus sit amet sem auctor, non commodo eros eleifend. Sed in tellus porttitor, placerat leo et, faucibus tortor. Nunc efficitur nibh id libero blandit, vel ornare erat vehicula.",
externalUrl: window.location.origin,
schemaUrl: "https://schema.org/schema",
price: "1",
diff --git a/src/pages/offers/OfferDetail.tsx b/src/pages/offers/OfferDetail.tsx
index 96ca74ea6..8aca31098 100644
--- a/src/pages/offers/OfferDetail.tsx
+++ b/src/pages/offers/OfferDetail.tsx
@@ -1,4 +1,5 @@
import { manageOffer } from "@bosonprotocol/widgets-sdk";
+import AddressImage from "@components/offer/AddressImage";
import RootPrice from "@components/price";
import { CONFIG } from "@lib/config";
import { QueryParameters, UrlParameters } from "@lib/routing/query-parameters";
@@ -168,6 +169,7 @@ export default function OfferDetail() {
const name = offer.metadata?.name || "Untitled";
const offerImg = `https://picsum.photos/seed/${offerId}/700`;
const sellerId = offer.seller?.id;
+ const sellerAddress = offer.seller?.admin;
const description = offer.metadata?.description || "";
return (
@@ -186,22 +188,20 @@ export default function OfferDetail() {
Description
{description}
-
- Seller Description
- Not defined
-
-
Delivery Information
Not defined
+
+ Seller
+
+
+ ID: {sellerId}
+
+
-
- Seller ID: {sellerId}
-
-
{name}