Skip to content

Commit

Permalink
Add timestakmp to basic cart object.
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenDufresne committed Jan 21, 2025
1 parent 4d9913b commit d40732d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
1 change: 1 addition & 0 deletions client/my-sites/checkout/src/test/util/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1381,6 +1381,7 @@ export function getBasicCart(): ResponseCart {
total_tax_integer: 700,
total_cost_integer: 15600,
sub_total_integer: 15600,
cart_generated_at_timestamp: 1610000000,
};
}

Expand Down
10 changes: 2 additions & 8 deletions client/my-sites/checkout/src/test/wp-checkout-order-summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ describe( 'WPCheckoutOrderSummary', () => {
const productFeatures = getAkismetProductFeatures( product, identity as translateType );
const cartChanges = {
products: [ product ],
cart_generated_at_timestamp: 1737356248,
};

render(
Expand Down Expand Up @@ -340,7 +339,6 @@ describe( 'WPCheckoutOrderSummary', () => {
test( 'No feature list items show up if there are multiple items in the cart', async () => {
const cartChanges = {
products: allAkismetProducts,
cart_generated_at_timestamp: 1737356248,
};

render(
Expand All @@ -357,7 +355,7 @@ describe( 'WPCheckoutOrderSummary', () => {
} );

test( 'No feature list items show up if the cart is empty', async () => {
const cartChanges = { products: [], cart_generated_at_timestamp: 1737356248 };
const cartChanges = { products: [] };

render(
<QueryClientProvider client={ queryClient }>
Expand All @@ -383,7 +381,6 @@ describe( 'WPCheckoutOrderSummary', () => {
const productFeatures = getJetpackProductFeatures( product, identity as translateType );
const cartChanges = {
products: [ product ],
cart_generated_at_timestamp: 1737356248,
};

render(
Expand Down Expand Up @@ -415,7 +412,6 @@ describe( 'WPCheckoutOrderSummary', () => {
test( 'No feature list items show up if there are multiple items in the cart', async () => {
const cartChanges = {
products: allJetpackProducts,
cart_generated_at_timestamp: 1737356248,
};

render(
Expand All @@ -432,7 +428,7 @@ describe( 'WPCheckoutOrderSummary', () => {
} );

test( 'No feature list items show up if the cart is empty', async () => {
const cartChanges = { products: [], cart_generated_at_timestamp: 1737356248 };
const cartChanges = { products: [] };

render(
<QueryClientProvider client={ queryClient }>
Expand All @@ -458,7 +454,6 @@ describe( 'WPCheckoutOrderSummary', () => {

const cartChanges = {
products: [ firstProduct ],
cart_generated_at_timestamp: 1737356248,
};

const { rerender } = render(
Expand All @@ -481,7 +476,6 @@ describe( 'WPCheckoutOrderSummary', () => {

const cartChanges_2 = {
products: [ secondProduct ],
cart_generated_at_timestamp: 1737356249,
};

rerender(
Expand Down

0 comments on commit d40732d

Please sign in to comment.