increase test coverage for react files

已完成 已发布的 3 个月前 货到付款
已完成 货到付款

For example :

import { classNamesHelper } from '@archibald/client';

import CategoryName from '@components/atoms/category-name/CategoryName';

import Icon from '@components/atoms/icon/Icon';

import Link, { LinkType } from '@components/atoms/link/Link';

import ShowMoreButton from '@components/atoms/show-more/ShowMoreButton';

import Classes from '@components/organisms/product-listing/facets/category/tree/item/[login to view URL]';

import { getSearchPathObject } from '@helpers/search';

import { CategoryHierarchy } from '@interfaces/base/category';

import { IconType } from '@constants';

import { useState } from 'react';

interface ICategoryItem {

category: CategoryHierarchy;

currentCategoryId: string;

currentTotal: number;

parentCategoryUrl?: string;

parentCategoryQuery?: string;

level?: number;

}

function CategoryItem({ category, currentCategoryId, currentTotal, parentCategoryUrl, parentCategoryQuery, level = 0 }: ICategoryItem) {

const hasSubCategories = !!category?.subcategories?.length;

const isCurrent = [login to view URL] === currentCategoryId;

const categoryClasses = classNamesHelper([[login to view URL], (hasSubCategories || isCurrent) && [login to view URL]]);

const subCategoryClasses = classNamesHelper([parentCategoryUrl && [login to view URL], [login to view URL]]);

const showMore = !!(category?.subcategories && category?.subcategories?.length > 4) && level >= 1;

const [isCollapsed, setIsCollapsed] = useState(!showMore);

const showCounter = (![login to view URL] && isCurrent) || ([login to view URL] && !hasSubCategories);

const subcategories = isCollapsed && showMore ? category?.subcategories?.slice(0, 4) : category?.subcategories;

function collapse() {

setIsCollapsed(!isCollapsed);

}

return (

<div className={[login to view URL]} data-testid="category-item" data-active={isCurrent ? true : undefined}>

<div className={categoryClasses}>

{parentCategoryUrl &&

(isCurrent || hasSubCategories ? (

<Link

type={[login to view URL]}

to={getSearchPathObject(parentCategoryUrl, parentCategoryQuery)}

testId={`category-item-${[login to view URL]}-back-icon-link`}

>

<Icon className={[login to view URL]} iconType={IconType.CHEVRON_LEFT} data-testid="active-category-icon" />

</Link>

) : (

<div className={[login to view URL]} />

))}

<div className={[login to view URL]}>

<Link type={[login to view URL]} to={getSearchPathObject([login to view URL], [login to view URL])}>

<div className={[login to view URL]}>

<CategoryName name={[login to view URL]} id={[login to view URL]} />

</div>

</Link>

{showCounter && (

<div data-testid={`category-item-${[login to view URL]}-total`} className={[login to view URL]}>

{[login to view URL] ? [login to view URL] : currentTotal}

</div>

)}

</div>

</div>

{hasSubCategories && (

<div className={subCategoryClasses} data-testid="category-item-subcategories">

{subcategories?.map((cat, index) => (

<CategoryItem

category={cat}

currentCategoryId={currentCategoryId}

currentTotal={currentTotal}

parentCategoryUrl={[login to view URL]}

parentCategoryQuery={[login to view URL]}

key={`category-item-${[login to view URL]}-${index}`}

level={level + 1}

/>

))}

{showMore && <ShowMoreButton showState={!isCollapsed} onClick={collapse} data-testid={`category-item-${[login to view URL]}-show-more-button`} />}

</div>

)}

</div>

);

}

export default CategoryItem;

React.js React.js Framework

项目ID: #38697309

关于项目

32个方案 远程项目 活跃的3 个月前

授予:

TrueLancer69

hello. how are you? I have your code. I take several developers and so I can test about code correctly. I need just to you. looking forward to your chat. Thanks.

$31 USD 在1天内
(1条评论)
2.2

有32名威客正在参与此工作的竞标,均价$140/小时

creativeleads

Hello! I have extensive experience in React and test coverage improvements. I will help increase your test coverage for the given components, ensuring the reliability and maintainability of your codebase. My focus is o 更多

$120 USD 在3天内
(5条评论)
5.3
Vikasv8

Hello, Ive 5+ yrs of experience in web development. Ive hands on expertise in Develoent and unit test case coverage. I can help you with your test coverage improvement. Regards.

$50 USD 在2天内
(13条评论)
4.3
imandaneshi1

Hi there, I am a skilled React developer with experience in increasing test coverage for applications, and I can help enhance your current setup to ensure robustness and reliability. I will write comprehensive unit an 更多

$200USD 在1天里
(3条评论)
3.7
ludiac

Hello there. I am writing to express my interest in the project of increasing test coverage for your React files. With extensive experience in React.js, JavaScript testing frameworks like Jest and React Testing Librar 更多

$140 USD 在7天内
(2条评论)
3.0
mykhailo6

As a highly experienced full stack developer specializing in web and mobile applications, blockchain, artificial intelligence, and machine learning, I bring a wealth of expertise to your project. With a proven track re 更多

$220USD 在1天里
(1条评论)
2.7
EuroAppDev

Hello, How are you? I have extensive experience in React, TypeScript, and writing unit tests using libraries like Jest and React Testing Library to improve test coverage. So I can provide you with a solution to inc 更多

$100USD 在1天里
(2条评论)
2.3
sviatoslavv2

Hello, there. I hope you're doing well. Yes, I am the person you're looking for. I’m confident in delivering this project efficiently while ensuring a smooth user experience Let's discuss more detail via chatting Thank 更多

$30 USD 在7天内
(0条评论)
0.0
joshuam148

@Hello, there@ I see you have a React component for rendering a category item with subcategories. This component effectively manages the display of categories, including handling their collapsed state and showing a " 更多

$255 USD 在7天内
(0条评论)
0.0
AbeRuca441218

Hello, dear Sir. ❤️❤️❤️ How are you? I have carefully reviewed the details of your project and fully understand your need for enhancements to your React.js code, specifically for a complex category listing. My extensi 更多

$200 USD 在5天内
(0条评论)
0.0
s4birli

Hello, there. Rather than simply stating that I can do it, I want to demonstrate my thorough understanding of your project and how I can work with you to achieve your goals. I recognize that deadlines and budgets ar 更多

$140 USD 在7天内
(0条评论)
0.0
ozodjon1999

Given the existing code sample and your need to increase test coverage, I am the ideal candidate for this job. With over 5 years of experience as a full-stack developer, I have gained a comprehensive understanding of n 更多

$170 USD 在2天内
(0条评论)
0.0
creativem6

Having worked extensively with React.js, I possess the necessary skills to increase test coverage for your React files effectively. My proficiency includes writing comprehensive unit tests using tools such as Jest and 更多

$70 USD 在2天内
(0条评论)
0.0
petrob2

Hello. thanks for posting. I am familiar with ReactJs and I am sure I can help you. Please contact me to discuss further. Thanks Petro

$100 USD 在2天内
(0条评论)
0.0
gradefinnesse

HELLO DEAR CLIENT I have gone through your project details, and have all the required skills, and VAST EXPERIENCE.I confirm to you that the project is doable since it's within my area of EXPERTISE i.e MATLAB/SIMULINK, 更多

$250 USD 在7天内
(0条评论)
0.0
somsak1202

Hi. I am going to start your project right now. I have some questions but let's discuss them over chat. I’m interested to hear more about your specific needs and any additional requirements you may have. If you award 更多

$140 USD 在7天内
(0条评论)
0.0
maquinnac

❤️ Dear, hiring manager! ❤️ I understood EXACTLY WHAT YOU ARE LOOKING FOR. ★Furthermore I can start IMMEDIATELY and finish within STRICT DEADLINE.★ Let's discuss about what you want Thanks.

$140 USD 在7天内
(0条评论)
0.0
rashidamjad

As an experienced and highly skilled full-stack developer, specializing in React.js, I am confident that I am the perfect fit to increase the test coverage for your react files. With five years of hands-on experience, 更多

$250 USD 在5天内
(0条评论)
2.5
vaishali913

Hello With 7 years of experience as a full-stack developer, I possess a diverse range of skills that position me as the ideal candidate for your project. My expertise in front-end development, especially with React. 更多

$100 USD 在7天内
(0条评论)
0.0
aurelianm3

I hope this message finds you well. I have experience in similar work before. If you give me a chance, I will do my best. Thanks.

$100 USD 在3天内
(0条评论)
0.0
hokolesquat

Hello, manager I would like to work with you because I am sure I can give your perfect result with my talent react skill. Let's discuss on chat box. Thanks.

$140 USD 在7天内
(0条评论)
0.0