Skip to content

Commit

Permalink
Typescript validation and export.
Browse files Browse the repository at this point in the history
  • Loading branch information
rogoit committed Sep 29, 2023
1 parent 58a94db commit 7c1ff39
Show file tree
Hide file tree
Showing 46 changed files with 5,009 additions and 713 deletions.
61 changes: 30 additions & 31 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,33 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Start Python HTTP Server
run: |
python -m http.server --directory src 8090 &
echo "SERVER_PID=$!" >> $GITHUB_ENV
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: 16

- name: Install Cypress and dependencies
run: |
npm ci
- name: Run Cypress tests
run: |
npx cypress run --config baseUrl=http://localhost:8090 --config-file=cypress.config.ts
- name: Stop Python HTTP Server
if: always()
run: |
kill $SERVER_PID
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Start Python HTTP Server
run: |
python -m http.server --directory src 8090 &
echo "SERVER_PID=$!" >> $GITHUB_ENV
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: 16

- name: Install Cypress and dependencies
run: |
npm ci
- name: Run Cypress tests
run: |
npx cypress run --config baseUrl=http://localhost:8090 --config-file=cypress.config.ts
- name: Stop Python HTTP Server
if: always()
run: |
kill $SERVER_PID
3 changes: 3 additions & 0 deletions cypress/e2e/validate.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ describe('Validate Testify Tests', () => {
beforeEach(() => {
cy.visit('/');
});
it('Click accept all cookies', () => {
cy.ttCookieAllAcceptClick();
});
it('Accessibility test', () => {
cy.ttAccessibility();
});
Expand Down
24 changes: 14 additions & 10 deletions cypress/e2e/validate.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,37 @@ describe('Validate Testify Tests', () => {
cy.visit('/')
})

it('Click accept all cookies', () => {
cy.ttCookieAllAcceptClick()
})

it('Accessibility test', () => {
cy.ttAccessibility()
})

it('Imprint', () => {
cy.ttValidateImprintClickable()
})
})

it('Detect google services', () => {
cy.ttValidateNoGoogleServices()
})

it('More than one img with status ok', () => {
cy.ttValidateAllImagesResponseStatusOk()
})
cy.ttValidateAllImagesResponseStatusOk()
})

it('More than 2 internal links for each are ok', () => {
cy.ttEveryInternalLinkStatusOk()
})
})

it('All subpages are loading', () => {
cy.ttEveryInternalLinkIsLoading()
})
cy.ttEveryInternalLinkIsLoading()
})

it('Validate page content', () => {
cy.ttValidatePageContent()
})
cy.ttValidatePageContent()
})

it('Only one h1', () => {
cy.ttOnlyOneH1()
Expand Down
13 changes: 6 additions & 7 deletions mysite/.eleventy.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
module.exports = function(eleventyConfig) {
eleventyConfig.addPassthroughCopy('assets');
module.exports = function (eleventyConfig) {
eleventyConfig.addPassthroughCopy('assets')
return {
dir: {
output: "../src"
}
};
};

output: '../src',
},
}
}
2 changes: 1 addition & 1 deletion mysite/NCA.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: base-layout.njk
title: NCA - TESTIFY
---

<h1>NCA - TESTIFY</h1>
<button type="button">Click Me!</button>
<p>Beispieltext für diese Seite.</p>

9 changes: 7 additions & 2 deletions mysite/_data/navigation.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
[ { "url": "/", "label": "Startseite" }, { "url": "/ueber-uns/", "label": "Über uns" }, { "url": "/impressum/", "label": "Impressum" }, { "url": "/blog/post1/", "label": "Blog Post 1" }, { "url": "/blog/post2/", "label": "Blog Post 2" }]

[
{ "url": "/", "label": "Startseite" },
{ "url": "/ueber-uns/", "label": "Über uns" },
{ "url": "/impressum/", "label": "Impressum" },
{ "url": "/blog/post1/", "label": "Blog Post 1" },
{ "url": "/blog/post2/", "label": "Blog Post 2" }
]
33 changes: 16 additions & 17 deletions mysite/_site/blog/post1/index.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Blog Post 1</title>
</head>
<body>
<nav>
<ul>
</ul>
</nav>
<main>
<p>Dies ist der Inhalt von Blog Post 1. Hier erfahren Sie mehr über interessante Themen und Neuigkeiten.</p>

</main>
</body>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Blog Post 1</title>
</head>
<body>
<nav>
<ul></ul>
</nav>
<main>
<p>
Dies ist der Inhalt von Blog Post 1. Hier erfahren Sie mehr über
interessante Themen und Neuigkeiten.
</p>
</main>
</body>
</html>

33 changes: 16 additions & 17 deletions mysite/_site/blog/post2/index.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Blog Post 2</title>
</head>
<body>
<nav>
<ul>
</ul>
</nav>
<main>
<p>Dies ist der Inhalt von Blog Post 2. Bleiben Sie auf dem Laufenden und entdecken Sie weitere spannende Themen.</p>

</main>
</body>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Blog Post 2</title>
</head>
<body>
<nav>
<ul></ul>
</nav>
<main>
<p>
Dies ist der Inhalt von Blog Post 2. Bleiben Sie auf dem Laufenden und
entdecken Sie weitere spannende Themen.
</p>
</main>
</body>
</html>

32 changes: 14 additions & 18 deletions mysite/_site/impressum/index.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Impressum</title>
</head>
<body>
<nav>
<ul>

</ul>
</nav>
<main>
<h1>Impressum</h1>
<p>Beispieltext für das Impressum.</p>

</main>
</body>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Impressum</title>
</head>
<body>
<nav>
<ul></ul>
</nav>
<main>
<h1>Impressum</h1>
<p>Beispieltext für das Impressum.</p>
</main>
</body>
</html>

40 changes: 20 additions & 20 deletions mysite/_site/index.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Startseite</title>
</head>
<body>
<nav>
<ul>

</ul>
</nav>
<main>
<h1>Willkommen auf der Startseite</h1>
<p>Hier finden Sie Informationen über unser Unternehmen und unseren Blog.</p>
<img src="/assets/kill-bill-roland-golla.jpg" alt="Kill Bugs Fakebild mit Roland Golla im Kill Bill Look" />


</main>
</body>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Startseite</title>
</head>
<body>
<nav>
<ul></ul>
</nav>
<main>
<h1>Willkommen auf der Startseite</h1>
<p>
Hier finden Sie Informationen über unser Unternehmen und unseren Blog.
</p>
<img
src="/assets/kill-bill-roland-golla.jpg"
alt="Kill Bugs Fakebild mit Roland Golla im Kill Bill Look"
/>
</main>
</body>
</html>

35 changes: 17 additions & 18 deletions mysite/_site/ueber-uns/index.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Über uns</title>
</head>
<body>
<nav>
<ul>
</ul>
</nav>
<main>
<h1>Über uns</h1>
<p>Wir sind ein Beispielunternehmen, das sich auf die Erstellung hochwertiger Inhalte spezialisiert hat.</p>

</main>
</body>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Über uns</title>
</head>
<body>
<nav>
<ul></ul>
</nav>
<main>
<h1>Über uns</h1>
<p>
Wir sind ein Beispielunternehmen, das sich auf die Erstellung
hochwertiger Inhalte spezialisiert hat.
</p>
</main>
</body>
</html>

2 changes: 1 addition & 1 deletion mysite/blog/post1.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
layout: blog-layout.njk
title: Blog Post 1
---
<p>Dies ist der Inhalt von Blog Post 1. Hier erfahren Sie mehr über interessante Themen und Neuigkeiten.</p>

<p>Dies ist der Inhalt von Blog Post 1. Hier erfahren Sie mehr über interessante Themen und Neuigkeiten.</p>
2 changes: 1 addition & 1 deletion mysite/blog/post2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
layout: blog-layout.njk
title: Blog Post 2
---
<p>Dies ist der Inhalt von Blog Post 2. Bleiben Sie auf dem Laufenden und entdecken Sie weitere spannende Themen.</p>

<p>Dies ist der Inhalt von Blog Post 2. Bleiben Sie auf dem Laufenden und entdecken Sie weitere spannende Themen.</p>
9 changes: 0 additions & 9 deletions mysite/cypress.config.js

This file was deleted.

20 changes: 0 additions & 20 deletions mysite/cypress/support/e2e.js

This file was deleted.

Loading

0 comments on commit 7c1ff39

Please sign in to comment.