Skip to content

Commit

Permalink
replace className with data-test-subj
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Nov 20, 2024
1 parent 4473066 commit bb45851
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ export function HeaderLogo({ href, navigateToApp, loadingCount$, ...observables
{customizedLogo ? (
<img
src={customizedLogo}
className="chrHeaderLogo__mark"
data-test-subj="logoMark"
css={styles.logoMarkCss}
style={{ maxWidth: '200px', maxHeight: '84px' }}
alt="custom mark"
/>
) : (
<ElasticMark className="chrHeaderLogo__mark" css={styles.logoMarkCss} aria-hidden={true} />
<ElasticMark data-test-subj="logoMark" css={styles.logoMarkCss} aria-hidden={true} />
)}
</a>
);
Expand Down
3 changes: 1 addition & 2 deletions x-pack/test/custom_branding/tests/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
require.resolve('./acme_text.png')
);
await goToSettings();
const logo = await testSubjects.find('logo');
const img = await logo.findByCssSelector('.chrHeaderLogo__mark');
const img = await testSubjects.find('logoMark');
const imgSrc = (await img.getAttribute('src')) ?? '';
expect(imgSrc.startsWith('data:image/png')).to.be(true);
});
Expand Down

0 comments on commit bb45851

Please sign in to comment.