Skip to content

Commit

Permalink
Merge H5P editor branch with Staging (#668)
Browse files Browse the repository at this point in the history
* [FEATURE] [FRONTEND] Update H5P editor on-init event hook (#631)

* change editor-on-init to use element polling

* #fix Public folder on production should be mounted to avoid content deletion on re-deployment

Co-authored-by: Moses Okemwa <[email protected]>

* [FEATURE] [Backend] oEmbed endpoint standardization & Wikonnect Open Graph protocol integration (#640)

* Add extra global properties

* standardize oEmbed response format & added XML support

Signed-off-by: mimidots <[email protected]>

* Inject oEmbed & Open Graph meta tags into page headers

* bug fix #comment component not found during tests

* Feature/wik 63 updating single chapter page to match design (#647)

* Add assets

* Delete assests

* Add assets

* Change chapter comments api response

* Update single chapter creator and description sections

* Add ember inflector package for pluralizing words

* Add reply-section component

* Update comment model to have replies

* Add getter for showing number of comments

* Add reply component to comment component

* Update styles to match designs

* Add username above comment form

* ignoring data folder for postgres image mount

Signed-off-by: mosesokemwa <[email protected]>

* Lint fixes

* Add Share component to display
social media sharing options on single chapter page

* Add assets

* Delete assests

* Add assets

* Change chapter comments api response

* Update single chapter creator and description sections

* Add ember inflector package for pluralizing words

* Add reply-section component

* Update comment model to have replies

* Add getter for showing number of comments

* Add reply component to comment component

* Update styles to match designs

* Add username above comment form

* Lint fixes

* Add Share component to display
social media sharing options on single chapter page

* ignoring data folder for postgres image mount

Signed-off-by: mosesokemwa <[email protected]>

* alter comments replies relationship

Signed-off-by: mosesokemwa <[email protected]>

* automated migration run after deployment

Signed-off-by: mosesokemwa <[email protected]>

* Testing replies

* Fix comments and replies section

* Fix breaking circle ci tests

* Fix reply cypress tests

* Fix failing cypress tests on Circle CI

Co-authored-by: mosesokemwa <[email protected]>

* [BUG] Teach module content preview page broken if chapter has tags #652 (#655)

* fix #content preview page broken if chapter has tags

Signed-off-by: mimidotsuser <[email protected]>

* fix failing Cypress test

Signed-off-by: mimidotsuser <[email protected]>

* fix failing Cypress test

Signed-off-by: mimidotsuser <[email protected]>

* fixes failing tests and removes any test hack fixes

Signed-off-by: mimidotsuser <[email protected]>

* remove awesome homepage reaction tests hacks. Boring is sure bet.

Signed-off-by: mimidotsuser <[email protected]>

* fix failing homepage reaction tests

Signed-off-by: mimidotsuser <[email protected]>

* rollback last tests

Signed-off-by: mimidotsuser <[email protected]>

* Hot fix: Chapter & comments author details not displayed correctly  (#657)

* align single chapter action icons

Signed-off-by: mimidotsuser <[email protected]>

* fix issue with uploading & fetching user profile picture locally

Signed-off-by: mimidotsuser <[email protected]>

* added name attribute to a user model

Signed-off-by: mimidotsuser <[email protected]>

* fix #chapter not returning user profile image and name details

Signed-off-by: mimidotsuser <[email protected]>

* fixed chapter author details shown as private at homepage & single chapter page

Signed-off-by: mimidotsuser <[email protected]>

* avoid re-fetching chapter author profile images if previously done

Signed-off-by: mimidotsuser <[email protected]>

* fix #user GET all routes not returning any users' info

Signed-off-by: mimidotsuser <[email protected]>

* correctly display comment author name and profile picture (if profile is not private)

Signed-off-by: mimidotsuser <[email protected]>

* fix #user should not be able to submit empty comment or reply

Signed-off-by: mimidotsuser <[email protected]>

* fix #fallback username not found in user's model virtual property

Signed-off-by: mimidotsuser <[email protected]>

* fix #single chapter author object details mismatch

Signed-off-by: mimidotsuser <[email protected]>

* fix failing tests.

Signed-off-by: mimidotsuser <[email protected]>

* about page should link to wikonnect.org & single chapter page title should indicate the current chapter title

Signed-off-by: mimidotsuser <[email protected]>

* Fix typos and add links to developers and designers (#660)

* Fix typos and add links to developers and designers

* Fix typos and add links to developers and designers

* Capitalize Swag

Signed-off-by: mimidotsuser <[email protected]>

Co-authored-by: mimidotsuser <[email protected]>

* hotfix/chapter-creator-images (#661)

* Fix/translating strings (#662)

* fix pluralization of number of comments

* Add lint rule to ensure no bare strings

* Add translations for home page

* Add translations to single chapter page

* Add translations for login page

* Remove ember inflector package

* Add translations to signup form

* Add translations for teach preview page

* Add translations to user profile

* Add missing translations to components

* Add missing translations to miscelaneous templates

* Fix failing comment cypress test

* Update README with link to Nathan's github

* H5p editor configuration file not found fix (#663)

* use getters while retrieving adapter headers since session has tracked properties

Signed-off-by: mimidotsuser <[email protected]>

* Fix #H5P config file not found

Signed-off-by: mimidotsuser <[email protected]>

* Added H5P editor two base endpoints documentation

Signed-off-by: mimidotsuser <[email protected]>

* fix H5P editor static content not loading (#664)

Signed-off-by: mimidotsuser <[email protected]>

* PM2 ecosystem config updates (#665)

Signed-off-by: mimidotsuser <[email protected]>

Co-authored-by: Moses Okemwa <[email protected]>
Co-authored-by: Brian Marete <[email protected]>
  • Loading branch information
3 people authored Mar 30, 2021
1 parent 70a05c1 commit a29aba8
Show file tree
Hide file tree
Showing 136 changed files with 3,247 additions and 1,088 deletions.
3 changes: 2 additions & 1 deletion .env-sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
PROJECT_NAME=Wikonnect
APP_NAME=Wikonnect
APP_URL=https://app.wikonnect.org

NODE_ENV=development
LOG_LEVEL=error
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ dump.rdb
yarn-error.log
*.envrc
.env
data/*
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@

Wikonnect is an open-source e-learning platform designed to allow anyone to learn, create educational content, and
contribute to building the platform as a designer or a software developer. The initial courses offered on the platform will be around digital literacy, to get more people
using the internet in more productive ways. Developed by Tunapanda Institute in Nairobi, Kenya. The original platform (
called 'swag') was used to provide technology, design, and business training in low-income communities with low
using the internet in more productive ways. Developed by [Tunapanda Institute](https://tunapanda.org/) in Nairobi, Kenya. The original platform (called 'Swag') was used to provide technology, design, and business training in low-income communities with low
bandwidth.

Come say hi 👋 on our [Wikonnect Community Discord Server!](https://discord.gg/tT9Ug6D)


Getting Started
--
Expand All @@ -42,7 +43,7 @@ recommend [getting started](https://guides.emberjs.com/release/getting-started/q
the tutorials.

The backend is developed using [KoaJS](https://koajs.com/). The API docs are hosted
at [tunapanda.github.io/wikonnect)](https://tunapanda.github.io/wikonnect)
at [tunapanda.github.io/wikonnect](https://tunapanda.github.io/wikonnect)

## Wikonnect Tech Stack

Expand Down Expand Up @@ -84,8 +85,8 @@ at [tunapanda.github.io/wikonnect)](https://tunapanda.github.io/wikonnect)
- [Ubuntu installation](https://docs.docker.com/engine/install/ubuntu/)
- [Fedora installation](https://docs.docker.com/engine/install/fedora/)
- [Debian installation](https://docs.docker.com/engine/install/debian/)
- [Mac installation](https://docs.docker.com/docker-for-mac/install/) -Installed as docker desktop
- [Windows installation](https://docs.docker.com/docker-for-windows/install/) -Installed as docker desktop
- [Mac installation](https://docs.docker.com/docker-for-mac/install/) - Installed as docker desktop
- [Windows installation](https://docs.docker.com/docker-for-windows/install/) - Installed as docker desktop

#### Starting a development server

Expand Down Expand Up @@ -226,7 +227,7 @@ Frontend set up steps:

1) Navigate into the **frontend** directory
```
cd server/
cd frontend/
```
2) Install the frontend dependencies
```
Expand Down Expand Up @@ -275,11 +276,17 @@ This project is licensed under MIT. See the [license](license) file for details

## Authors 🧙

### Lead developers
### Developers

- **[Moses Okemwa](https://github.com/mosesokemwa)** - _Lead Backend developer and maintainer_
- **[Proverbial Ninja](https://github.com/proverbial-ninja)** - _Lead Frontend developer and maintainer_
- **[Murage Martin](https://github.com/mimidotsuser)** - _Full Stack Developer_
- **[Brian Marete](https://github.com/brianmarete)** - _Frontend Developer_

- **[Moses Okemwa](https://github.com/mosesokemwa)** - _Lead developer and maintainer_
- **[Proverbial Ninja](https://github.com/proverbial-ninja)** - _Lead developer and maintainer_

### UI/UX Designers
- **[Yego Kelvins](https://www.behance.net/kevinsyego)**
- **[Nathan Macharia](https://github.com/macharian8)**
### Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Expand Down
197 changes: 0 additions & 197 deletions cypress/fixtures/chapters.json

This file was deleted.

9 changes: 8 additions & 1 deletion cypress/integration/chapter/chapter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ describe('Chapter view', () => {
it('should display chapter details', () => {
cy.visit('/');
cy.get(':nth-child(1) > .card > .card-body > .card-title a').click();
cy.get('#chapter > h4').should('exist').should('be.visible');
// Chapter title
cy.get('.chapter-title > h4').should('exist').should('be.visible');
// Chapter author
cy.get('.chapter-author > p').should('exist').should('be.visible');
// Chapter views and creation date
cy.get('.chapter-metadata > p').should('exist').should('be.visible');
// Chapter description
cy.get('.chapter-description > p').should('exist').should('be.visible');
});


Expand Down
52 changes: 43 additions & 9 deletions cypress/integration/chapter/comment.spec.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
function parentComment() {
return cy.comments({parentId: false}).then((comments) => {
return comments
.filter((comment) => comment.chapterId !== undefined)[0]
});
}

describe('Chapter comments when authenticated', () => {

beforeEach(() => {
cy.login();
cy.visit('/')
cy.get(':nth-child(5) > .card > .card-body > .card-title a').click()
parentComment()
.then((comment) => {
cy.visit(`/chapter/${comment.chapterId}`)
});
});


Expand Down Expand Up @@ -62,19 +71,43 @@ describe('Chapter comments when authenticated', () => {
});

it('should display comments', () => {
cy.get('#chapter #comments')
.should('exist')
cy.get('div#comments-section .media-body')
.should('exist');
});


it('should be able to reply to a comment', () => {
const reply = `Test reply randomly at ${Math.random() * 1000000}`;

cy.get('#chapter .padded form textarea').type('Memento Mori');
cy.get('#chapter .padded form button[type="submit"]').click();

cy.get('#comments-section > :nth-child(1) > .media-body > .reply-actions > :nth-child(2) > button')
.click();

cy.get('.reply-form textarea').should('be.visible');

cy.get('.reply-form textarea').type(reply);
cy.get('.reply-form button[type=submit]').click();

cy.get(
"#comments-section > :nth-child(1) > .media-body > .media > .replies"
)
.contains(reply)
.should('be.visible');
});


})


describe('Chapter comments without authentication', () => {

beforeEach(() => {
cy.visit('/')
cy.get(':nth-child(5) > .card > .card-body > .card-title a').click()
parentComment()
.then((comment) => {
cy.visit(`/chapter/${comment.chapterId}`)
});
});


Expand All @@ -84,8 +117,9 @@ describe('Chapter comments without authentication', () => {
});

it('should display available comments', () => {
cy.get('#chapter .media-body')
.should('be.visible')
cy.get('#chapter #comments-section .media-body')
.should('exist')
});

})
});

Loading

0 comments on commit a29aba8

Please sign in to comment.