Remove unused data-cy attributes

This commit is contained in:
Misode
2024-11-19 15:14:10 +01:00
parent 72fe13fcdc
commit 0b7e9b6948
4 changed files with 7 additions and 7 deletions

View File

@@ -22,9 +22,9 @@ export function Header() {
return <header>
<div class="title">
<Link class="home-link" href="/" aria-label={locale('home')} data-cy="home-link">{Icons.home}</Link>
<Link class="home-link" href="/" aria-label={locale('home')}>{Icons.home}</Link>
<h1 class="font-bold">{title}</h1>
{gen && <BtnMenu icon="chevron_down" tooltip={locale('switch_generator')} data-cy="generator-switcher">
{gen && <BtnMenu icon="chevron_down" tooltip={locale('switch_generator')}>
{config.generators
.filter(g => g.tags?.[0] === gen?.tags?.[0] && checkVersion(version, g.minVersion))
.map(g =>
@@ -39,7 +39,7 @@ export function Header() {
</div>
<nav>
<ul>
<li data-cy="language-switcher">
<li>
<BtnMenu icon="globe" tooltip={locale('language')}>
{config.languages.map(({ code, name }) =>
<Btn label={name} active={code === lang}
@@ -47,7 +47,7 @@ export function Header() {
)}
</BtnMenu>
</li>
<li data-cy="theme-switcher">
<li>
<BtnMenu icon={Themes[theme]} tooltip={locale('theme')}>
{Object.entries(Themes).map(([th, icon]) =>
<Btn icon={icon} label={locale(`theme.${th}`)} active={th === theme}

View File

@@ -74,7 +74,7 @@ export function ProjectCreation() {
<TextInput class={`btn btn-input${!creating && invalidNamespace ? ' invalid' : ''}`} placeholder={locale('project.namespace')} value={namespace} onChange={setNamespace} />
{!creating && invalidNamespace && <div class="status-icon danger tooltipped tip-e" aria-label={locale('project.namespace.invalid')}>{Octicon.issue_opened}</div>}
</div>
<BtnMenu icon="tag" label={version} tooltip={locale('switch_version')} data-cy="version-switcher">
<BtnMenu icon="tag" label={version} tooltip={locale('switch_version')}>
{versions.map(v =>
<Btn label={v} active={v === version} onClick={() => setVersion(v)} />
)}

View File

@@ -216,7 +216,7 @@ export function SourcePanel({ docAndNode, doCopy, doDownload, doImport, copySucc
{window.matchMedia('(pointer: coarse)').matches && <>
<Btn icon="paste" onClick={importFromClipboard} />
</>}
<BtnMenu icon="gear" tooltip={locale('output_settings')} data-cy="source-controls">
<BtnMenu icon="gear" tooltip={locale('output_settings')}>
{getSourceIndents().map(key =>
<Btn label={locale(`indentation.${key}`)} active={indent === key}
onClick={() => changeIndent(key)}/>

View File

@@ -80,7 +80,7 @@ export function Tree({ docAndNode: original, onError }: TreePanelProps) {
return type
}, [resourceType, ctx])
return <div class="tree node-root" data-cy="tree" data-category={getCategory(resourceType)}>
return <div class="tree node-root" data-category={getCategory(resourceType)}>
{(ctx && mcdocType) && <McdocRoot type={mcdocType} node={fileChild.children[0]} makeEdit={makeEdit} ctx={ctx} />}
</div>
}