Skip to content

Commit

Permalink
feat: Add Made with love by maibornwolff to the logo #3837 (#3940)
Browse files Browse the repository at this point in the history
* feat: Add Made with love by maibornwolff to the logo #3837

* fix: Update logo page object selectors for consistency #3940

---------

Co-authored-by: Christian Hühn <[email protected]>
  • Loading branch information
2 people authored and BenediktMehl committed Feb 21, 2025
1 parent cc0765b commit aaf953f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
12 changes: 6 additions & 6 deletions visualization/app/codeCharta/e2e/logo.po.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
export class LogoPageObject {
async getVersion() {
await page.waitForSelector("#logo > h2")
const versionString = await page.$eval("#logo > h2", element => element["innerText"])
await page.waitForSelector(".logo > #logo-version")
const versionString = await page.$eval(".logo > #logo-version", element => element["innerText"])
return versionString.split(" ")[1]
}

async getLink() {
await page.waitForSelector("#logo > a")
return page.$eval("#logo > a", element => element["href"])
await page.waitForSelector(".logo > a")
return page.$eval(".logo > a", element => element["href"])
}

async getImageSrc() {
await page.waitForSelector("#logo > a > img")
return page.$eval("#logo > a > img", element => element["src"])
await page.waitForSelector(".logo > a > img")
return page.$eval(".logo > a > img", element => element["src"])
}
}
9 changes: 6 additions & 3 deletions visualization/app/codeCharta/ui/logo/logo.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<div id="logo">
<div class="logo">
<a href="https://github.com/MaibornWolff/codecharta" target="_blank" rel="noopener noreferrer">
<img src="codeCharta/assets/codecharta_logo.svg" alt="CodeCharta" rel="noopener noreferrer"
/></a>
<h2>Version {{ version }}</h2>
/>
</a>
<p id="logo-version">Version {{ version }}</p>
<p>Made with &#10084; by <a target="_blank" href="https://www.maibornwolff.de/en/">MaibornWolff</a></p>
</div>

11 changes: 6 additions & 5 deletions visualization/app/codeCharta/ui/logo/logo.component.scss
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
#logo {
display: flex;
flex-direction: column;
.logo {
position: absolute;
left: 2em;
bottom: 1em;
z-index: 1;
flex-direction: column;
display: flex;
align-items: flex-start;

img {
object-fit: contain;
max-width: 100%;
width: 5em;
height: auto;
}

h2 {
p {
color: #5a585a;
font-weight: bold;
font-size: 10px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ describe("metricChooserComponent", () => {
const { fixture } = await render(LogoComponent)

const version = packageJson.version
expect(fixture.elementRef.nativeElement.querySelector("h2").textContent).toContain(version)
expect(fixture.elementRef.nativeElement.querySelector("#logo-version").textContent).toContain(version)
})
})

0 comments on commit aaf953f

Please sign in to comment.