diff --git a/apps/sky-analytics/components/cart/cart.tsx b/apps/sky-analytics/components/cart/cart.tsx index 472d2856..78462c76 100644 --- a/apps/sky-analytics/components/cart/cart.tsx +++ b/apps/sky-analytics/components/cart/cart.tsx @@ -7,6 +7,7 @@ import { CartProps } from './cart.types' import CartList from './cart-list' import Styles from './cart.module.css' import { Loader, Typography, Button as BecknButton, Button } from '@beckn-ui/molecules' +import { testIds } from '@shared/dataTestIds' const Cart: React.FC = ({ schema: { loader, cartItems, actionButton, emptyCard }, // Destructure props @@ -81,6 +82,7 @@ const Cart: React.FC = ({ diff --git a/apps/sky-analytics/components/cart/cart.types.ts b/apps/sky-analytics/components/cart/cart.types.ts index 0f9b3ad7..2f12ecf7 100644 --- a/apps/sky-analytics/components/cart/cart.types.ts +++ b/apps/sky-analytics/components/cart/cart.types.ts @@ -39,6 +39,7 @@ export interface CartProps { loader: LoaderProps emptyCard?: EmptyCardProps actionButton?: { + dataTest?: string text: string handleOnClick: MouseEventHandler } diff --git a/apps/sky-analytics/components/frequentlyAccessed/FrequentlyAccessed.tsx b/apps/sky-analytics/components/frequentlyAccessed/FrequentlyAccessed.tsx index b24f2564..9973448b 100644 --- a/apps/sky-analytics/components/frequentlyAccessed/FrequentlyAccessed.tsx +++ b/apps/sky-analytics/components/frequentlyAccessed/FrequentlyAccessed.tsx @@ -3,6 +3,7 @@ import { Box, CardBody, Flex, Icon, Image, Stack, Card, useTheme, Text } from '@ import { Typography } from '@beckn-ui/molecules' import { StarIcon, TimeIcon } from '@chakra-ui/icons' import { CurrencyType, ProductPrice } from '@beckn-ui/becknified-components' +import { testIds } from '@shared/dataTestIds' type FrequentlyAccessedProps = { frequentlyAccessedData: Array<{ @@ -33,6 +34,7 @@ const FrequentlyAccessed: React.FC = ({ frequentlyAcces fontSize="17px" fontWeight="400" text="Frequently Accessed" + data-test={testIds.Frequently_accessed_text} sx={{ mb: '20px' }} /> @@ -45,6 +47,7 @@ const FrequentlyAccessed: React.FC = ({ frequentlyAcces > {frequentlyAccessedData.map((item, index) => ( { }, actionButton: { text: 'Proceed', + dataTest: testIds.Proceed, handleOnClick: () => { router.push('/checkout') } diff --git a/apps/sky-analytics/pages/orderHistory.tsx b/apps/sky-analytics/pages/orderHistory.tsx index c36dcf36..6480aeb7 100644 --- a/apps/sky-analytics/pages/orderHistory.tsx +++ b/apps/sky-analytics/pages/orderHistory.tsx @@ -166,6 +166,7 @@ const OrderHistory = () => { text={order.attributes.items[0].name} fontWeight="600" fontSize={'15px'} + dataTest="order_history_item_name" /> { { textDecoration="underline" href="https://www.google.com" target="_blank" + data-test={testIds.TermsandConditions_link} > Terms and Conditions @@ -194,12 +197,13 @@ const Product = () => { mr="20px" >