Added "Add repo" senario testing (#502)

* Adding start of add repository flow

* Adding data-cy instead of css selectors

* Saving progress

* Adding fixture data

* Cleaning the test
This commit is contained in:
Tamir Abutbul
2024-01-23 12:26:07 +02:00
committed by GitHub
parent e954b7a37c
commit 383760e7a7
14 changed files with 317 additions and 5 deletions

View File

@@ -13,7 +13,7 @@ const LinkWithSearchParams = ({
}) => {
const { search } = useLocation();
const { context } = useParams();
const {clusterMode} = useAppContext();
const { clusterMode } = useAppContext();
const params = new URLSearchParams(search);
// For state we don't want to keep while navigating
@@ -27,7 +27,13 @@ const LinkWithSearchParams = ({
prefixedUrl = `/${context}${to}`;
}
return <NavLink to={`${prefixedUrl}/?${params.toString()}`} {...props} />;
return (
<NavLink
data-cy="navigation-link"
to={`${prefixedUrl}/?${params.toString()}`}
{...props}
/>
);
};
export default LinkWithSearchParams;