Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
53d5543
Merge pull request #1 from NJIT-WIS/master
tawana0518 Mar 9, 2023
8181b64
Updated line 6 with docker repo
tawana0518 Mar 9, 2023
1a2b318
Updated line 12 with docker repo
tawana0518 Mar 9, 2023
81ff614
Merge branch 'NJIT-WIS:master' into master
bmarani Mar 12, 2023
936d277
added Team_Productivity_Log.md and playwright test mywebclass_privacy…
rk864 Mar 17, 2023
f16615f
Merge pull request #14 from tawana0518/11-team-productivity-log
rk864 Mar 17, 2023
9d1bf79
Update Team_Productivity_Log.md
rk864 Mar 17, 2023
9fda2c0
Update Team_Productivity_Log.md
bmarani Mar 17, 2023
752e9ba
Update Team_Productivity_Log.md
tawana0518 Mar 18, 2023
b895929
Updating table with issue 12
tawana0518 Mar 18, 2023
bba724c
Update Team_Productivity_Log.md
tawana0518 Mar 18, 2023
1c4025a
Update Package.Json to point to my team project repository
rk864 Mar 19, 2023
91548f2
Merge pull request #17 from tawana0518/Update_Package_JSON
rk864 Mar 19, 2023
9c19167
Delete mywebclass_internationalization.spec.js
rk864 Mar 19, 2023
d46fb1f
Completing Internatinalization Reseach for Sprint1 with changes in in…
rk864 Mar 19, 2023
e805dcf
Merge pull request #18 from tawana0518/3-internationalization-research
rk864 Mar 19, 2023
543e6f7
create playwright test script based on SEO research. I will need to a…
tawana0518 Mar 19, 2023
09c684f
Merge pull request #19 from tawana0518/seoresearch
tawana0518 Mar 19, 2023
b17aee2
Updated privacy html file with correct title
tawana0518 Mar 21, 2023
0f2a764
Merge pull request #20 from tawana0518/5-seo-research
tawana0518 Mar 21, 2023
a722ef2
updated privacy policy
bmarani Mar 21, 2023
485b876
Merge pull request #21 from tawana0518/privacypolicy
bmarani Mar 21, 2023
083f2e1
Closing my research on Frontend and Bootstrap, tested with Playwright…
rk864 Mar 21, 2023
dffc35c
Merge pull request #22 from tawana0518/13-bootstrap-front-end-respons…
rk864 Mar 21, 2023
4514ff8
Added project deployment link to readme file
tawana0518 Mar 21, 2023
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 .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- 'v*'

env:
DOCKER_REPO_NAME: kaw393939/mywebclass
DOCKER_REPO_NAME: tawanaarthur/project1

jobs:
build:
Expand Down
16 changes: 16 additions & 0 deletions Team_Productivity_Log.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Team Productivity Log

This table tracks the progress of tasks in our project, including the issue title, story points, issue link, status, assigned to and assigned on, completed on, category, and status notes.

| Issue title | Story points | Issue link | Status | Assigned to, Assigned on | Completed on | Category | Status notes |
|------------------------------------------|--------------|-----------------------------------------------------------------------|-------------|--------------------------|--------------|---------------|----------------------------------------------------------|
| Team Productivity Log | 1 | [Link](https://github.com/tawana0518/mywebclass-simulation/issues/11) | Completed | Rajiv, 2022-03-16 | 2022-03-16 | Documentation | Completed documenting Marked Down File |
| Internationalization Research | 2 | [Link](https://github.com/tawana0518/mywebclass-simulation/issues/3) | In Progress | Rajiv, 2022-03-15 | - | Research | Drafted initial version on Internationalization Research |
| Home Page | 5 | [Link](https://github.com/tawana0518/mywebclass-simulation/issues/2) | In Progress | Rajiv, 2022-03-14 | - | Enhancement | Initial analysis in progress |
| Front End Responsive Frameworks Research | 3 | [Link](https://github.com/tawana0518/mywebclass-simulation/issues/13) | To do | Rajiv, 2022-03-16 | - | Research | |
| Accessibility Research | 2 | [Link](https://github.com/tawana0518/mywebclass-simulation/issues/4) | Completed | Berta, 2022-03-14 | 2022-03-15 | Research | Drafted initial version on Accessibility Research |
| Legal compliance Research | 2 | [Link](https://github.com/tawana0518/mywebclass-simulation/issues/6) | Completed | Berta, 2022-03-14 | 2022-03-15 | Research | Drafted initial version for legal compliance and privacy policy Research |
| SEO research | 2 | [Link](https://github.com/tawana0518/mywebclass-simulation/issues/5) | Completed | Tawana, 2022-03-14 | 2022-03-15 | Research | Researched and draft SEO Research - found in Wiki |
|Playwright Tests Research | 3 | [Link](https://github.com/tawana0518/mywebclass-simulation/issues/12) | In progress | Tawana, 2022-03-17 | - | Research | Continuing research on playwright testing and lighthouse reports |
To add a new task to the table, a team member should create an issue on GitHub and add the link to the table with the relevant details. By keeping track of our progress in this table, we can ensure that tasks are assigned and completed efficiently and effectively.

2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: "3.8"
services:
master_branch:
development_branch:
image: kaw393939/mywebclass:development
image: tawanaarthur/project1:development
container_name: development_branch
pull_policy: always
restart: always
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mywebclass.org",
"version": "0.1.0",
"version": "0.1.1",
"description": "Help for students and teachers learning advanced technologies.",
"main": "src/index.js",
"directories": {
Expand All @@ -25,14 +25,14 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/NJIT-WIS/mywebclass.git"
"url": "git+https://github.com/tawana0518/mywebclass-simulation.git"
},
"author": "Keith Williams @ NJIT.EDU",
"license": "MIT",
"bugs": {
"url": "https://github.com/NJIT-WIS/mywebclass/issues"
"url": "https://github.com/tawana0518/mywebclass-simulation/issues"
},
"homepage": "https://github.com/NJIT-WIS/mywebclass#readme",
"homepage": "https://github.com/tawana0518/mywebclass-simulation#readme",
"devDependencies": {
"@playwright/test": "^1.31.1",
"autoprefixer": "^10.4.13",
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@ Finally, use Playwright to create powerful and reliable automated tests for web


# ADD YOUR PROJECT LINKS BELOW THIS
[Github Pages Live Site Deployment](https://tawana0518.github.io/mywebclass-simulation/)
1 change: 1 addition & 0 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!DOCTYPE html>
<!--@Rajiv 19th March - Updated the lang attribute from "EN" to "{lang}" in the html tag in your index.html file to support dynamic language changes: -->
<html lang="EN">

<head>
Expand Down
14 changes: 14 additions & 0 deletions src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import allPage from './allPages'
import contentPage from './contentPage'

document.addEventListener('DOMContentLoaded', () => {
// @Rajiv 19th March - Call the setLanguage() function when the DOM content is loaded
setLanguage()
allPage.initialize()
contentPage.initialize()
})
Expand Down Expand Up @@ -109,3 +111,15 @@ document.addEventListener('DOMContentLoaded', () => {
createPrivacyModal()
loadGoogleAnalytics()
})

// @Rajiv 19th March - Create a JavaScript function in the main.js file to set the language attribute dynamically based on the user's language preference:
function setLanguage () {
// Get the user's preferred language
const userLang = navigator.language || navigator.userLanguage

// Check if the user's language is supported (in this example, we're checking for English)
const supportedLang = userLang.substring(0, 2).toLowerCase() === 'en' ? 'en' : 'en'

// Set the 'lang' attribute of the 'html' tag to the supported language
document.documentElement.setAttribute('lang', supportedLang)
}
76 changes: 34 additions & 42 deletions src/privacy.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<!--characterset UTF-8 Watch this: https://youtu.be/MijmeoH9LT4 -->

<title>MyWebClass.org | Our Story</title>
<title>MyWebClass.org | Privacy Policy</title>
<meta charset="UTF-8">

<meta content="width=device-width, initial-scale=1" name="viewport">
Expand Down Expand Up @@ -72,22 +72,19 @@ <h2 class="justify-left">Navigation</h2>

<h1 class="fw-bold border-bottom" id="title">Privacy Policy</h1>
<div class="text-muted mb-3 ">By <a href="#">Author Name</a><span class="text-muted me-3"> Last Updated:
January 1, 2022</span> <span class="text-muted" id="readingTime">0</span>
March 19, 2023</span> <span class="text-muted" id="readingTime">0</span>
</div>
<section class="row">
<h1>Privacy Policy</h1>

<p>We at mywebclass.org are committed to protecting your privacy. This Privacy Policy explains what
information we collect from you when you visit our website, how we use it, and how we protect
it. By using our website, you agree to the terms of this Privacy Policy.</p>
<p>We at MyWebClass are committed to protecting your privacy. This privacy policy explains how we
collect, use, and protect your personal information when you use our website.</p>
<h2>Information we collect</h2>
<p>We may collect the following information from you when you visit our website:</p>
<p>We may collect personal information from you when you visit our website, such as:</p>
<ul>
<li>Personal information such as your name and email address, if you choose to provide it to
us.
<li>your name,
</li>
<li>Information about your use of the website, such as pages visited, time spent on the site,
and links clicked.
<li>email address,
</li>
<li>Information about your device, such as your IP address, browser type, and operating
system.
Expand All @@ -96,49 +93,44 @@ <h2>Information we collect</h2>
<h2>How we use your information</h2>
<p>We use the information we collect from you for the following purposes:</p>
<ul>
<li>To improve our website and the user experience.</li>
<li>To analyze user behavior and measure the effectiveness of our content and marketing
efforts.
<li>To provide you with the services and products you have requested </li>
<li>To communicate with you about our services and products
</li>
<li>To communicate with you about our products and services, if you have provided us with your
contact information.
<li>To improve our website and services
</li>
<li>To comply with legal obligations.</li>
<li>To comply with legal obligations</li>
<li>to send you marketing communications, such as newsletters or promotional offers, if you have provided your consent.</li>
</ul>
<h2>Sharing of Information</h2>
<p>We do not sell, rent, or trade your personal information to third parties. However, we may share
your personal information with third-party service providers who assist us in providing our services and products to you.</p>
<h2>Security Measures</h2>
<p>We take reasonable measures to protect your personal information from unauthorized access, use, or disclosure.
However, we cannot guarantee the security of your information, as no method of transmission over the internet is completely secure.</p>
<h2>Accessibility Policy</h2>
<p>We are committed to ensuring that our website is accessible to everyone, including individuals with disabilities.
We strive to comply with the Web Content Accessibility Guidelines (WCAG) 2.1 Level AA.</p>
<h2>Google Analytics</h2>
<p>We use Google Analytics to collect information about your use of our website. Google Analytics
collects information such as how often users visit the site, what pages they visit when they do
so, and what other sites they used prior to coming to our website. We use the information we get
from Google Analytics to improve our website and the user experience. Google Analytics collects
only the IP address assigned to you on the date you visit our website, rather than your name or
other identifying information. We do not combine the information collected through the use of
Google Analytics with personally identifiable information. Google Analytics plants a permanent
cookie on your web browser to identify you as a unique user the next time you visit our website.
This cookie cannot be used by anyone other than Google. Google’s ability to use and share
information collected by Google Analytics about your visits to our website is restricted by the
Google Analytics Terms of Use and the Google Privacy Policy.</p>
<h2>Data retention and security</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
access, disclosure, alteration, and destruction.</p>
<p>We use Google Analytics to help analyze how users use our website. The tool uses cookies to collect
standard Internet log information and visitor behavior information in an anonymous form. The information
generated by the cookie about your use of the website (including IP address) is transmitted to Google.
This information is then used to evaluate visitors' use of the website and to compile statistical
reports on website activity for us.</p>
<h2>Data retention and security</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
access, disclosure, alteration, and destruction.</p>
<h2>Your rights</h2>
<p>You have the right to access, correct, and delete your personal information. You also have the
right to object to the processing of your personal information and to withdraw your consent to
the processing of your personal information. To exercise these rights, please contact us at
[contact email address].</p>
<h2>Changes to this Privacy Policy</h2>
<p>We may update this Privacy Policy from time to time. We will notify you of any changes by posting
the new Privacy Policy on this page. We recommend that you review this Privacy Policy
periodically for any changes.</p>
<p>You have the right to access, modify, or delete your personal information. You may also withdraw
your consent to receive marketing communications from us at any time. To exercise these rights,
please contact us using the contact information provided below.</p>
<h2>Changes to This Policy</h2>
<p>We may update this privacy policy from time to time. Any changes will be posted on this page, and
the date at the top of the page will indicate when the policy was last updated.</p>
<h2>Contact us</h2>
<p>If you have any questions about this Privacy Policy, please contact us at [contact email
address].</p>
<p>If you have any questions or concerns about our privacy policy or the handling of your personal
information, please contact us at NJIT.edu.</p>

</section>

Expand Down
2 changes: 2 additions & 0 deletions src/scss/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,6 @@ body.banner-offset {
}
}




32 changes: 32 additions & 0 deletions tests/bootstrap.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const { test, expect } = require('@playwright/test')

test.describe('MyWebClass.org Bootstrap implementation', () => {
test.beforeEach(async ({ page }) => {
await page.goto('https://mywebclass.org')
})

// test('should have a responsive navigation bar', async ({ page }) => {
// const navbar = await page.waitForSelector('.navbar', { state: 'visible', timeout: 10000 })
// expect(navbar).toBeTruthy()
//
// await page.setViewportSize({ width: 320, height: 480 }) // Simulate a mobile device
//
// const navbarToggler = await page.waitForSelector('.navbar-toggler', { state: 'visible', timeout: 10000 })
// expect(navbarToggler).toBeTruthy()
//
// const isNavbarCollapsed = await navbarToggler.evaluate(toggler => toggler.getAttribute('aria-expanded') === 'false')
// expect(isNavbarCollapsed).toBeTruthy()
//
// await navbarToggler.click()
// const isNavbarExpanded = await navbarToggler.evaluate(toggler => toggler.getAttribute('aria-expanded') === 'true')
// expect(isNavbarExpanded).toBeTruthy()
// })

test('should have a footer with py-5 class for padding', async ({ page }) => {
const footer = await page.waitForSelector('footer', { state: 'visible', timeout: 10000 })
expect(footer).toBeTruthy()

const footerPadding = await footer.evaluate(footerElement => footerElement.classList.contains('py-5'))
expect(footerPadding).toBeTruthy()
})
})
26 changes: 26 additions & 0 deletions tests/mywebclass_internationalization.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { test, expect } from '@playwright/test'

test.describe('MyWebClass.org internationalization', () => {
let page

test.beforeEach(async ({ browser }) => {
page = await browser.newPage()
await page.goto('http://localhost:3000')
})

test.afterEach(async () => {
await page.close()
})

test('should display the site in "en" when the "Accept-Language" header is set to "en"', async () => {
// Set the Accept-Language header and navigate to the website
await page.setExtraHTTPHeaders({ 'Accept-Language': 'en' })
await page.goto('http://localhost:3000')

// Check if the lang attribute of the HTML tag is set to "en"
const langAttribute = await page.getAttribute('html', 'lang')
expect(langAttribute).toBe('en', 'The lang attribute of the HTML tag is not set to "en".')

// Perform any additional checks for the "en" language version of the website here, e.g., checking specific text or elements
})
})
21 changes: 21 additions & 0 deletions tests/mywebclass_privacy.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* global localStorage */
import { test, expect } from '@playwright/test'

test('test', async ({ page }) => {
await page.goto('http://localhost:3000/')
await page.getByRole('button', { name: 'Agree', exact: true }).click()

// Retrieve the privacyPolicyAgreed item from local storage
const privacyPolicyAgreed = await page.evaluate(() => {
return localStorage.getItem('privacyPolicyAgreed')
})

// Check if privacyPolicyAgreed is set in local storage
expect(privacyPolicyAgreed).toBeTruthy()

// Click the "Content Template" link
await page.getByRole('link', { name: 'Content Template' }).click()

// Click the "Section 3" link
await page.getByRole('link', { name: 'Section 3' }).click()
})
27 changes: 27 additions & 0 deletions tests/mywebclass_seo.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { test, expect } from '@playwright/test'

test.describe('MyWebClass.org tests', () => {
test('SEO tests', async ({ page }) => {
await page.goto('http://localhost:3000/')
// Test for keyword research
const keywords = ['MyWebClass.org']
const pageContent = await page.textContent('body')
const hasKeywords = keywords.every(keyword => pageContent.includes(keyword))
expect(hasKeywords).toBeTruthy()
// Test for meta tags
const pageTitle = await page.title()
const pageMetaDescription = await page.$eval('meta[name="description"]', el => el.content)
const pageMetaKeywords = await page.$eval('meta[name="keywords"]', el => el.content)
const hasMetaTags = Boolean(pageTitle && pageMetaDescription && pageMetaKeywords)
expect(hasMetaTags).toBeTruthy()
// Test for URL structure
const pageUrl = page.url()
const pageUrlPathname = new URL(pageUrl).pathname
const hasProperUrlStructure = Boolean(pageUrl && !pageUrl.includes('%20') && pageUrlPathname === '/')
expect(hasProperUrlStructure).toBeTruthy()
// Test for fast load times
const pageLoadTime = await page.evaluate(() => window.performance.timing.domContentLoadedEventEnd - window.performance.timing.navigationStart)
const isFastLoading = pageLoadTime <= 5000
expect(isFastLoading).toBeTruthy()
})
})