Skip to content
Merged

Seo #25

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/privacy.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ <h2>Data retention and security</h2>
it was collected, unless a longer retention period is required by law. We take reasonable
measures to protect the information we collect from loss, theft, misuse, and unauthorized
access, disclosure, alteration, and destruction.</p>
<h2>Data retention and security</h2>
<h2>GDPR Guidelines</h2>
<p>We retain the information we collect for as long as necessary to fulfill the purposes for which
it was collected, unless a longer retention period is required by law. We take reasonable
measures to protect the information we collect from loss, theft, misuse, and unauthorized
Expand Down
17 changes: 17 additions & 0 deletions tests/mywebclass_SEOTesting.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// @ts-check
const { test, expect } = require('@playwright/test')

test('SEO optimization test', async ({ page }) => {
// Navigate to your website's home page
await page.goto('http://localhost:3000')

// Check if keyword research has been conducted and implemented
const pageContent = await page.innerText('body')
expect(pageContent).toContain('MyWebClass.org')

// Check if meta tags are optimized
const metaDescription = await page.$eval('head meta[name="description"]', el => el.content)
expect(metaDescription).toContain('project')
const metaKeywords = await page.$eval('head meta[name="keywords"]', el => el.content)
expect(metaKeywords).toContain('My Webclass Homepage')
})
16 changes: 16 additions & 0 deletions tests/mywebclass_measures.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// @ts-check
const { test, expect } = require('@playwright/test')

test('Page load speed test', async ({ page }) => {
// Navigate to the page you want to test
await page.goto('http://localhost:3000')

// Measure the time it takes for the page to fully load
const pageLoadTime = await page.evaluate(() => {
const timing = performance.timing
return timing.loadEventEnd - timing.navigationStart
})

// Expect the page to load in under 3 seconds (3000 ms)
expect(pageLoadTime).toBeLessThanOrEqual(3000)
})
15 changes: 15 additions & 0 deletions tests/mywebclass_performance.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// @ts-check
const { test, expect } = require('@playwright/test')

test('Performance Test', async ({ page }) => {
// Navigate to the website to test
await page.goto('http://localhost:3000')

// Measure the load time of the website
const loadStartTime = Date.now()
await page.waitForLoadState('networkidle')
const loadTime = Date.now() - loadStartTime

// Check if the load time is below a certain threshold
expect(loadTime).toBeLessThanOrEqual(5000) // 5 seconds
})