diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md index aabbc0f0a..677258e6f 100644 --- a/.github/ISSUE_TEMPLATE/question.md +++ b/.github/ISSUE_TEMPLATE/question.md @@ -1,12 +1,12 @@ --- name: 💬 Question -about: If you need help understanding HumanConnection. +about: If you need help understanding ocelot.social. labels: question title: 💬 [Question] --- - - + + ## :speech_balloon: Question diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b5f74d879..50d3721d1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,31 +4,33 @@ Thank you so much for thinking of contributing to the Human Connection project! ## Getting Set Up -Instructions for how to install all the necessary software and some code guidelines can be found in our [documentation](https://docs.human-connection.org/human-connection/). +Instructions for how to install all the necessary software and some code guidelines can be found in our main [Readme](/README.md) or in our [documentation](https://docs.human-connection.org/human-connection/). -To get you started we recommend that you join forces with a regular contributor. Please join [our discord instance](https://human-connection.org/discord) to chat with developers or just get in touch directly on an issue on either [Github](https://github.com/Ocelot-Social-Community/Ocelot-Social/issues) or [Zenhub](https://app.zenhub.com/workspaces/ocelotsocial-5fb21ff922cb410015dd6535/board?filterLogic=any&repos=301151089): +To get you started we recommend that you join forces with a regular contributor. Please join [our Discord instance](https://discord.gg/AJSX9DCSUA) to chat with developers or just get in touch directly on an issue on either [Github](https://github.com/Ocelot-Social-Community/Ocelot-Social/issues) or [Zenhub](https://app.zenhub.com/workspaces/ocelotsocial-5fb21ff922cb410015dd6535/board?filterLogic=any&repos=301151089): ![](https://dl.dropbox.com/s/vbmcihkduy9dhko/Screenshot%202019-01-03%2015.50.11.png?dl=0) -We also have regular pair programming sessions that you are very welcome to join! We feel this is often the best way to get to know both the project and the team. Most developers are also available for spontaneous sessions if the times listed below don't work for you – just ping us on discord. +We also have regular pair programming sessions that you are very welcome to join! We feel this is often the best way to get to know both the project and the team. Most developers are also available for spontaneous sessions if the times listed below don't work for you – just ping us on Discord. ## Development Flow We operate in two week sprints that are planned, estimated and prioritised on [Zenhub](https://app.zenhub.com/workspaces/ocelotsocial-5fb21ff922cb410015dd6535/board?filterLogic=any&repos=301151089). All issues are also linked to and synced with [Github](https://github.com/Ocelot-Social-Community/Ocelot-Social/issues). Look for the `good first issue` label if you're not sure where to start! -We try to discuss all questions directly related to a feature or bug in the respective issue, in order to preserve it for the future and for other developers. We use discord for real-time communication. +We try to discuss all questions directly related to a feature or bug in the respective issue, in order to preserve it for the future and for other developers. We use Discord for real-time communication. This is how we solve bugs and implement features, step by step: + 1. We find an issue we want to work on, usually during the sprint planning but as an open source contributor this can happen at any time. 2. We communicate with the team to see if the issue is still available. (When you comment on an issue but don't get an answer there within 1-2 days try to mention @Human-Connection/hc-dev-team to make sure we check in.) 3. We make sure we understand the issue in detail – what problem is it solving and how should it be implemented? -4. We assign ourselves to the issue and move it to `In Progress` on [Zenhub](https://app.zenhub.com/workspaces/human-connection-nitro-5c0154ecc699f60fc92cf11f). +4. We assign ourselves to the issue and move it to `In Progress` on [Zenhub](https://app.zenhub.com/workspaces/ocelotsocial-5fb21ff922cb410015dd6535/board?filterLogic=any&repos=301151089). 5. We start working on it in a `new branch` and open a `pull request` prefixed with `[WIP]` (work in progress) to which we regularly push our changes. 6. When questions come up we clarify them with the team (directly in the issue on Github). 7. When we are happy with our work and our PR is passing all tests we remove the `[WIP]` from the PR description and ask for reviews (if you're not sure who to ask there is @Human-Connection/hc-dev-team which pings all core developers). 8. We then incorporate the suggestions from the reviews into our work and once it has been approved it can be merged into master! Every pull request needs to: + * fix an issue (if there is something you want to work on but there is no issue for it, create one first and discuss it with the team) * include tests for the code that is added or changed * pass all tests (linter, backend, frontend, end-to-end) @@ -38,37 +40,46 @@ Every pull request needs to: There are many volunteers all around the world helping us build this network and without their contributions we wouldn't be where we are today. Big thank you to all of you! -You can see the core team behind Human Connection [on our website](https://human-connection.org/en/the-team/). On Github you will mostly run into our developers: -* Robert (@roschaefer) -* Matt (@mattwr18) +You can talk to our core team on [Discord](https://discord.gg/AJSX9DCSUA). And on Github you will mostly run into our core developers: + +* Ulf (@ulfgebhardt) +* Moriz (@Mogge) * Wolle (@Tirokk) * Alex (@ogerly) + + ## Meetings and Pair Programming Sessions Times below refer to **German Time** – that's CET (GMT+1) in winter and CEST (GMT+2) in summer – because most Human Connection core team members are living in Germany. Daily standup -* every Monday–Friday 11:30 -* in the discord `Conference Room` + +* every Monday–Thursday 11:30 am (german time see above 👆🏼) +* in our [Discord](https://discord.gg/AJSX9DCSUA) `Office Cube` * all contributors welcome! * everybody shares what they are working on and asks for help if they are blocked + ## Philosophy @@ -102,10 +115,9 @@ We use pair programming sessions as a tool for knowledge sharing. We can learn a As a volunteeer you have no commitment except your own self development and your awesomeness by contributing to this free and open-source software project. Cheers to you! - ## Open-Source Bounties -There are so many good reasons to contribute to Human Connection +There are so many good reasons to contribute to ocelot.social * You learn state-of-the-art technologies * You build your portfolio @@ -121,7 +133,7 @@ pull request approved and merged for free**. You can choose something really quick and easy. What's important is starting a working relationship with the team, learning the workflow, and understanding this contribution guide. You can filter issues by 'good first issue', to get an idea where to start. Please join -our our [community chat](https://human-connection.org/discord), too. +our our [Discord community chat](https://discord.gg/AJSX9DCSUA), too. You can filter Github issues with label [bounty](https://github.com/Ocelot-Social-Community/Ocelot-Social/issues?q=is%3Aopen+is%3Aissue+label%3Abounty). These issues should have a second label `€` which indicate their respective financial compensation in Euros. diff --git a/README.md b/README.md index 4e1777c25..416fcaefb 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ Logins: ## Directory Layout There are four important directories: + * [Backend](./backend) runs on the server and is a middleware between database and frontend * [Frontend](./webapp) is a server-side-rendered and client-side-rendered web frontend * [Cypress](./cypress) contains end-to-end tests and executable feature specifications @@ -46,16 +47,19 @@ There are two approaches: ## Installation ### Clone the Repository + Clone the repository, this will create a new folder called `Ocelot-Social`: Using HTTPS: + ```bash $ git clone https://github.com/Ocelot-Social-Community/Ocelot-Social.git ``` Using SSH: + ```bash -$ git clone git@github.com:Human-Connection/Human-Connection.git +$ git clone git@github.com:Ocelot-Social-Community/Ocelot-Social.git ``` Change into the new folder. @@ -88,13 +92,15 @@ docker-compose version 1.23.2 #### Start Ocelot-Social via Docker-Compose For Development: + ```bash -docker-compose up +$ docker-compose up ``` -For Production +For Production: + ```bash -docker-compose -f docker-compose.yml up +$ docker-compose -f docker-compose.yml up ``` This will start all required Docker containers @@ -107,12 +113,12 @@ The only deployment method in this repository is `docker-compose` for developmen ## Developer Chat -Join our friendly open-source community on [Discord](https://discordapp.com/invite/DFSjPaX) :heart_eyes_cat: +Join our friendly open-source community on [Discord](https://discord.gg/AJSX9DCSUA) :heart_eyes_cat: Just introduce yourself at `#introduce-yourself` and mention `@@Mentor` to get you onboard :neckbeard: Check out the [contribution guideline](./CONTRIBUTING.md), too! We give write permissions to every developer who asks for it. Just text us on -[Discord](https://discord.gg/6ub73U3). +[Discord](https://discord.gg/AJSX9DCSUA). ## Technology Stack @@ -131,4 +137,5 @@ Browser compatibility testing with [BrowserStack](https://www.browserstack.com/) BrowserStack Logo ## License + See the [LICENSE](LICENSE.md) file for license rights and limitations (MIT). diff --git a/backend/src/config/links.js b/backend/src/config/links.js index c6f932c82..6b945a5e0 100644 --- a/backend/src/config/links.js +++ b/backend/src/config/links.js @@ -1,7 +1,13 @@ // this file is duplicated in `backend/src/config/links.js` and `webapp/constants/links.js` and replaced on rebranding export default { ORGANIZATION: 'https://ocelot.social', - DONATE: 'https://ocelot-social.herokuapp.com/donations', - FAQ: 'https://ocelot.social', SUPPORT: 'https://ocelot.social', + + // on null or empty strings internal imprint is used, see 'webapp/locales/html/' + DONATE: 'https://ocelot-social.herokuapp.com/donations', // we use 'ocelot-social.herokuapp.com' at the moment, because redirections of 'ocelot.social' subpages are not working correctly + IMPRINT: 'https://ocelot-social.herokuapp.com/imprint', // we use 'ocelot-social.herokuapp.com' at the moment, because redirections of 'ocelot.social' subpages are not working correctly + TERMS_AND_CONDITIONS: null, + CODE_OF_CONDUCT: null, + DATA_PRIVACY: null, + FAQ: 'https://ocelot.social', } diff --git a/webapp/components/PageFooter/PageFooter.spec.js b/webapp/components/PageFooter/PageFooter.spec.js index 0edc0fed2..53aaaa073 100644 --- a/webapp/components/PageFooter/PageFooter.spec.js +++ b/webapp/components/PageFooter/PageFooter.spec.js @@ -1,6 +1,6 @@ import { config, mount } from '@vue/test-utils' import PageFooter from './PageFooter.vue' -import links from '~/constants/links.js' +import linksDefault from '~/constants/links.js' const localVue = global.localVue @@ -8,6 +8,7 @@ config.stubs['nuxt-link'] = '' describe('PageFooter.vue', () => { let mocks + let wrapper beforeEach(() => { mocks = { @@ -15,30 +16,118 @@ describe('PageFooter.vue', () => { $env: { VERSION: 'v1.0.0', }, - links, } }) describe('mount', () => { - let wrapper const Wrapper = () => { return mount(PageFooter, { mocks, localVue }) } - beforeEach(() => { - wrapper = Wrapper() + describe('links.js', () => { + beforeEach(() => { + wrapper = Wrapper() + }) + + it('renders four links', () => { + expect(wrapper.findAll('a')).toHaveLength(4) + }) + + it('renders three nuxt-links', () => { + expect(wrapper.findAll('.nuxt-link')).toHaveLength(3) + }) + + it('renders version', () => { + expect(wrapper.find('.ds-footer').text()).toContain('v1.0.0') + }) }) - it('renders three links', () => { - expect(wrapper.findAll('a')).toHaveLength(3) + describe('inflexible links', () => { + beforeEach(() => { + wrapper = Wrapper() + }) + + it('renders ORGANIZATION', () => { + expect(wrapper.find('a[data-test="organization-link"]').exists()).toBe(true) + }) + + it('renders version', () => { + expect(wrapper.find('a[data-test="version-link"]').exists()).toBe(true) + }) }) - it('renders four nuxt-links', () => { - expect(wrapper.findAll('.nuxt-link')).toHaveLength(4) + describe('flexible links not set', () => { + beforeEach(async () => { + const links = { + ...linksDefault, + IMPRINT: null, + TERMS_AND_CONDITIONS: null, + CODE_OF_CONDUCT: null, + DATA_PRIVACY: null, + FAQ: null, + } + wrapper = Wrapper() + wrapper.setData({ links }) + await wrapper.vm.$nextTick() + }) + + it('renders IMPRINT as nuxt-link', () => { + expect(wrapper.find('span[data-test="imprint-nuxt-link"]').exists()).toBe(true) + }) + + it('renders TERMS_AND_CONDITIONS as nuxt-link', () => { + expect(wrapper.find('span[data-test="terms-nuxt-link"]').exists()).toBe(true) + }) + + it('renders CODE_OF_CONDUCT as nuxt-link', () => { + expect(wrapper.find('span[data-test="code-nuxt-link"]').exists()).toBe(true) + }) + + it('renders DATA_PRIVACY as nuxt-link', () => { + expect(wrapper.find('span[data-test="data-nuxt-link"]').exists()).toBe(true) + }) + + it('renders FAQ as nuxt-link', () => { + expect(wrapper.find('span[data-test="faq-nuxt-link"]').exists()).toBe(true) + }) }) - it('renders version', () => { - expect(wrapper.find('.ds-footer').text()).toContain('v1.0.0') + describe('flexible links set', () => { + beforeEach(async () => { + const links = { + ...linksDefault, + IMPRINT: 'https://ocelot.social/IMPRINT', + TERMS_AND_CONDITIONS: 'https://ocelot.social/TERMS_AND_CONDITIONS', + CODE_OF_CONDUCT: 'https://ocelot.social/CODE_OF_CONDUCT', + DATA_PRIVACY: 'https://ocelot.social/DATA_PRIVACY', + FAQ: 'https://ocelot.social/FAQ', + } + wrapper = Wrapper() + wrapper.setData({ links }) + await wrapper.vm.$nextTick() + }) + + it('renders IMPRINT as "a" tag link', () => { + expect(wrapper.find(`a[href="https://ocelot.social/IMPRINT"]`).exists()).toBe(true) + }) + + it('renders TERMS_AND_CONDITIONS as "a" tag link', () => { + expect(wrapper.find(`a[href="https://ocelot.social/TERMS_AND_CONDITIONS"]`).exists()).toBe( + true, + ) + }) + + it('renders CODE_OF_CONDUCT as "a" tag link', () => { + expect(wrapper.find(`a[href="https://ocelot.social/CODE_OF_CONDUCT"]`).exists()).toBe(true) + }) + + it('renders DATA_PRIVACY as "a" tag link', () => { + expect(wrapper.find(`a[href="https://ocelot.social/DATA_PRIVACY"]`).exists()).toBe(true) + }) + + it('renders FAQ as "a" tag link', () => { + expect(wrapper.find(`a[href="https://ocelot.social/FAQ"]`).exists()).toBe(true) + }) }) }) }) diff --git a/webapp/components/PageFooter/PageFooter.vue b/webapp/components/PageFooter/PageFooter.vue index ace0514e1..e31bc3e2a 100644 --- a/webapp/components/PageFooter/PageFooter.vue +++ b/webapp/components/PageFooter/PageFooter.vue @@ -1,26 +1,67 @@