Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • applications/etuc/hubl
  • applications/hubl
  • decentral1se/hubl
  • rngadam/hubl
  • jvtrudel/hubl
  • 3wc/hubl
6 results
Show changes
Commits on Source (1291)
Showing
with 1426 additions and 740 deletions
{
}
**/node_modules
config.json
.DS_Store
*.iml
*.swp
dist
.npm
# Test cache
cache
cypress/screenshots
cypress/videos
cache
.npm
.DS_Store
# Built files
.cache
dist
*-dist
dist-*
# Config specific files
config.json
config.*.json
!config.sample.json
# Client specific files
public/clients/*.css
!public/clients/sample.css
......@@ -2,14 +2,11 @@
stages:
- build
- test
- integration
- acceptance
- release
- deployment
- deploy
# default image for jobs
default:
image: node:11
image: node:22
# cache modules between jobs
cache:
......@@ -31,6 +28,8 @@ build:
expire_in: 1 day
paths:
- dist/
except:
- tags
tags:
- test
......@@ -38,247 +37,33 @@ build:
test:e2e:
stage: test
image: cypress/included:4.5.0
image:
name: cypress/included:13.15.2
entrypoint: [""]
services:
- name: ${CI_REGISTRY_IMAGE}/server:0.1
- name: ${CI_REGISTRY_IMAGE}/djangoldp:latest
before_script:
# install missing dependencies
- npm install -g sirv-cli
- npm install cypress-localstorage-commands
# making sure the process is orphan
- sirv dist --port 3000 > /dev/null 2>&1 &
- npm run serve -- -l silent &
script:
- cypress run -e CYPRESS_baseUrl=http://localhost:3000
- cypress run -e CYPRESS_baseUrl=http://localhost:4173
except:
- tags
tags:
- test
## VALIDATION ##
test1:
stage: integration
environment:
name: test1
url: https://test1.startinblox.com
before_script:
- npm ci --cache .npm --prefer-offline --only=production
script:
- echo "$APP_CONFIG_TEST1" > config.json
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* test1@astral.startinblox.com:~/front/
only:
- /^feature\/.*/
when: manual
tags:
- deploy
test2:
stage: integration
environment:
name: test2
url: https://test2.startinblox.com
before_script:
- npm ci --cache .npm --prefer-offline --only=production
script:
- echo "$APP_CONFIG_TEST2" > config.json
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* test2@astral.startinblox.com:~/front/
only:
- /^feature\/.*/
when: manual
tags:
- deploy
test3:
stage: integration
environment:
name: test3
url: https://test3.startinblox.com
before_script:
- npm ci --cache .npm --prefer-offline --only=production
script:
- echo "$APP_CONFIG_TEST3" > config.json
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* test3@astral.startinblox.com:~/front/
only:
- /^feature\/.*/
when: manual
tags:
- deploy
stg1:
stage: acceptance
environment:
name: stg1
url: https://stg1.startinblox.com
before_script:
- npm ci --cache .npm --prefer-offline --only=production
script:
- echo "$APP_CONFIG_STG1" > config.json
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* stg1@astral.startinblox.com:~/front/
only:
- /^release\/.*/
when: manual
tags:
- deploy
stg2:
stage: acceptance
environment:
name: stg2
url: https://stg2.startinblox.com
before_script:
- npm ci --cache .npm --prefer-offline --only=production
script:
- echo "$APP_CONFIG_STG2" > config.json
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* stg2@astral.startinblox.com:~/front/
only:
- /^release\/.*/
when: manual
tags:
- deploy
## RELEASE TAGGING ##
publish:
stage: release
script:
- npm install -g semantic-release@v17 @semantic-release/gitlab
- semantic-release
only:
- master
tags:
- deploy
## LIVE DEPLOYMENTS ##
community:
stage: deployment
environment:
name: community
url: https://community.startinblox.com
before_script:
- npm ci --cache .npm --prefer-offline --only=production
script:
- echo "$APP_CONFIG_COMMUNITY" > config.json
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* community@astral.startinblox.com:~/front/
only:
- master
when: manual
tags:
- deploy
etuc:
stage: deployment
environment:
name: etuc
url: https://app.digitalplatformobservatory.org
stage: deploy
image: node:22
before_script:
- npm ci --cache .npm --prefer-offline --only=production
- npm install -g semantic-release@24 @semantic-release/gitlab@13
script:
- echo "$APP_CONFIG_DIGITALPLATFORMOBSERVATORY" > config.json
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* etuc@ssh-etuc.happy-dev.fr:~/sib/www/
only:
- master
when: manual
tags:
- deploy
nantes:
stage: deployment
environment:
name: nantes
url: https://app.nantes.happy-dev.fr
before_script:
- npm ci --cache .npm --prefer-offline --only=production
script:
- echo "$APP_CONFIG_NANTESHD" > config.json
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* nantes@ssh-nantes.happy-dev.fr:~/sib/www/
only:
- master
when: manual
tags:
- deploy
paris:
stage: deployment
environment:
name: paris
url: https://app.paris.happy-dev.fr
before_script:
- npm ci --cache .npm --prefer-offline --only=production
script:
- echo "$APP_CONFIG_PARIS" > config.json
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* paris@ssh-paris.happy-dev.fr:~/sib/www/
only:
- master
when: manual
tags:
- deploy
toulouse:
stage: deployment
environment:
name: toulouse
url: https://smart-toulouse.happy-dev.fr
before_script:
- npm ci --cache .npm --prefer-offline --only=production
script:
- echo "$APP_CONFIG_TOULOUSE" > config.json
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* smart-toulouse@ssh-smart-toulouse.happy-dev.fr:~/www/
only:
- master
when: manual
tags:
- deploy
volumes:
stage: deployment
environment:
name: volumes
url: https://volumes.hubl.world
before_script:
- npm ci --cache .npm --prefer-offline --only=production
script:
- echo "$APP_CONFIG_VOLUMES" > config.json
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* volumes-sib@astral.startinblox.com:~/front/
only:
- master
when: manual
tags:
- deploy
volumes:
stage: deployment
environment:
name: community-hubl
url: https://community.hubl.world
before_script:
- npm ci --cache .npm --prefer-offline --only=production
script:
- echo "$APP_CONFIG_HUBL_COMMUNITY" > config.json
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* community-hubl@astral.startinblox.com:~/front/
- semantic-release
only:
- master
when: manual
tags:
- deploy
/label ~BUG
### What's happening?
*Describe in a few words what's happening*
### Steps to reproduce
*How one can reproduce the issue - this is very important*
1. Step 1
2. Step 2
3. Step 3
### Relevant logs and/or screenshots
*If possible, please add a screenshot.*
### Your Environment
(Include relevant details about the environment you experienced the bug in)
* Browser name and version:
* Operating System and version (desktop or mobile):
## What needs to be done?
/label ~Feature request
## Technical details
*Are there any technical details worth mentioning?*
## Test cases
*Describe here the tests needed in order to validate this feature*
1. Step 1
2. Step 2
3. Step 3
## Links & Mockups
1. Link to user story in wiki
2. other related Gitlab issues
## Checklist
<!---
Please, make sure you have changed the topic and also
described briefly what have you done. Thanks!
-->
I have done ...
- [ ] This commits targets only one specific issue
- [ ] The commit message follows our guidelines
- [ ] Tests for the changes have been added
- [ ] Docs have been added or updated
- [ ] I have assigned my architect to review this merge request
- [ ] I have checked how to create a [merge request]()
## Issues
<!---
Which issue this PR closes? It can close only one issue.
Which issues this PR references?
Please, specify all issues.
Format is: Closes #X or Refs #Y
Docs: https://docs.gitlab.com/ee/user/project/issues/closing_issues.html#via-merge-request
-->
## Time spent
<!---
This information is only required for statistics and analysis.
But we need to know exactly how much time you have spent,
please try to be as accurate as possible.
Format is: /spend 1h
Docs: https://docs.gitlab.com/ee/workflow/time_tracking.html
-->
/spend Xh
## Assignee
<!---
You need to assign your architect to review your merge request.
Format: /assign @username
Docs: https://docs.gitlab.com/ee/user/project/quick_actions.html
-->
/assign
## Feedback
<!---
Did you encounter any other problems you want to share with us?
Optional. Feel free to remove this section if you don't have any feedback.
-->
<!--- Thank you for you contribution! -->
{
"branches": [
"master",
{
"name": "beta",
"prerelease": true
}
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "angular",
"releaseRules": [
{
"type": "major",
"release": "major"
},
{
"type": "minor",
"release": "minor"
},
{
"type": "*",
"release": "patch"
}
]
}
],
"@semantic-release/release-notes-generator",
"@semantic-release/gitlab"
]
}
\ No newline at end of file
{
"includePaths": ["node_modules"]
}
\ No newline at end of file
MIT License
Copyright (c) 2018 Startin blox
Copyright (c) 2024-PRESENT Startin blox
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......
This diff is collapsed.
# Documentation
## Define your own colors
We use css variables to apply colors in the application.
The file can be found in src/styles/etc/
Example of use:
```css
:root {
--color-primary: #FFD759;
--color-secondary: #FFB700;
--color-complementary: #3C3F57;
--color-complementary-darken: #27293A;
}
```
Users can find example files at the root of the application. Use
- client.sample.happy-dev.css : for a more advanced example of customization.
- client.sample.css : to set five basic colors and let the default setup apply the colors.
:root {
--color-primary: #FF6765;
--color-secondary: #46271B;
--color-complementary: #5BB4CE;
--color-complementary-darken: #35A0C0;
--color-black-s: 45%;
--color-black-h: 16;
--color-black-l: 6%;
--color-text: #636363;
--color-primary: #FF0055;
--color-secondary: #0068FF;
--color-third: #00E3B4;
--color-heading: #2E3F58;
}
:root {
--color-primary: #FFB700;
--color-secondary: #3C3F57;
--color-complementary: #6259E5;
--color-complementary-darken: #36383B;
--color-white: #FFFFFF;
--color-black-h: 216;
--color-black-s: 4%;
--color-black-l: 22%;
--color-main-background: var(--color-grey-13);
--color-main-text: #7A7F85;
--color-highlight-primary: var(--color-primary);
--color-user-panel: var(--color-black);
--color-bell: var(--color-secondary);
--color-avatar-background: #E4E8ED;
--color-title: #36383B;
--color-h1: var(--color-title);
--color-h2: var(--color-title);
/* Header's elements */
--color-header-background: var(--color-white);
--color-bell: var(--color-complementary-darken);
--color-user-panel-header-text: var(--color-complementary-darken);
--color-user-panel-header-background: var(--color-white);
--color-user-panel-header-text-open: var(--color-white);
--color-user-panel-header-background-open: var(--color-secondary);
--color-user-panel-list-background: var(--color-white);
--color-user-panel-list-text-hover: var(--color-complementary);
--color-user-panel-list-border: #E4E8ED;
/* Left menu */
--color-menu-highlight-primary: #FFD759;
--color-menu-background: var(--color-secondary);
--color-menu-text: var(--color-white);
--color-menu-text-active: var(--color-secondary);
--color-menu-background-active: var(--color-menu-highlight-primary);
--color-menu-badge-background: var(--color-menu-highlight-primary);
--color-menu-badge-text-active: var(--color-menu-highlight-primary);
--color-menu-badge-background-active: var(--color-secondary);
--color-menu-icon-background-active: var(--color-secondary);
/* Right menu */
--color-right-menu-background: #DAE2F3;
--color-right-menu-text: var(--color-secondary);
--color-right-menu-link-border: #BDC2D7;
--color-right-menu-active-text: var(--color-primary);
--color-right-menu-active-background: var(--color-secondary);
--color-right-menu-active-icon: var(--color-primary);
/* Scrollbar */
--color-scrollbar-right-background: var(--color-white);
--color-scrollbar-right-track: var(--color-grey-6);
--color-scrollbar-left-background: var(--color-secondary);
--color-scrollbar-left-track: var(--color-grey-11);
/* Tags */
--color-tag-admin-text: var(--color-complementary);
--color-tag-admin-border: var(--color-complementary);
--color-tag-group-text: #9BA0A7;
--color-tag-group-border: var(--color-primary);
/* Form elements */
--color-button-white: var(--color-white);
--color-button-primary: var(--color-primary);
--color-button-secondary: var(--color-complementary);
--color-button-complementary: var(--color-secondary);
--color-input-background: #EDF1FA;
--color-input-text: var(--color-secondary);
--color-input-icon: var(--color-complementary);
--color-input-active: var(--color-complementary);
--color-fieldset: var(--color-title);
--color-fieldset-border: #DAE2F3;
--color-button-modal: var(--color-title);
--color-select-list: var(--color-secondary);
--color-select-add-button: var(--color-button-secondary);
--color-select-add-button-background: var(--color-button-white);
--color-label-dark: var(--color-complementary);
--color-label-light: var(--color-grey-6);
/* Skill */
--color-skill-background: var(--color-primary);
--color-skill-text: var(--color-white);
/* Icon */
--color-icon: var(--color-primary);
/* Table */
--color-table-header-background: #BDC2D7;
--color-table-header-text: var(--color-white);
--color-table-border: #BDC2D7;
/* User thumb */
--color-user-thumb-name: #7A7F85;
--color-backlink: var(--color-secondary);
--color-content-header: #DAE2F3;
/* Chat */
--color-chat-white: var(--color-white);
--color-chat-primary: var(--color-primary);
--color-chat-complementary: var(--color-complementary);
--color-chat-secondary: var(--color-secondary);
--color-chat-complementary-darken: var(--color-complementary-darken);
--color-chat-grey-1: var(--color-grey-4);
--color-chat-grey-2: var(--color-grey-6);
--color-chat-grey-3: var(--color-grey-10);
/* Directory */
--color-directory-grey-4: #7A7F85;
--color-directory-grey-5: #F0F3F6;
--color-directory-avatar-background: #E4E8ED;
--color-directory-back-link: #36383B;
--color-directory-border: #DAE2F3;
--color-directory-content-header-border: #DAE2F3;
--color-directory-h1: var(--color-complementary-darken);
--color-directory-list-icon: var(--color-primary);
--color-directory-text: var(--color-directory-grey-4);
--color-directory-form-input: #EDF1FA;
--color-directory-form-input-text: var(--color-directory-grey-4);
--color-directory-form-input-active: var(--color-complementary);
--color-directory-form-select-icon: var(--color-complementary);
}
/* Button to edit a channel or a project (in project-profile) */
#project sib-link[next="project-edit"],
#circle sib-link[next="circle-edit"] {
background: var(--color-complementary);
border: 1px solid var(--color-complementary);
}
#project sib-link[next="project-edit"]:hover,
#circle sib-link[next="circle-edit"]:hover {
background: var(--color-white);
border: 1px solid var(--color-complementary);
color: var(--color-complementary);
}
/* Button to delete a channel */
#circle-profile>div>div.box-button>sib-ac-checker>sib-delete {
background: var(--color-white);
border: 1px solid var(--color-complementary);
color: var(--color-complementary);
}
#circle-profile>div>div.box-button>sib-ac-checker>sib-delete>button {
color: var(--color-complementary);
}
#circle-profile>div>div.box-button>sib-ac-checker>sib-delete:hover {
background: var(--color-complementary);
border: 1px solid var(--color-complementary);
color: var(--color-white);
}
#circle-profile>div>div.box-button>sib-ac-checker>sib-delete:hover>button {
color: var(--color-white);
}
/* Button with a pen to edit a user */
#admin-users-list>div>div.table>sib-display>div>sib-display>div>sib-action-hd-custom>sib-ac-checker>sib-link {
background: var(--color-complementary);
border: 1px solid var(--color-complementary);
color: var(--color-white);
}
#admin-users-list>div>div.table>sib-display>div>sib-display>div>sib-action-hd-custom>sib-ac-checker>sib-link:hover {
background: var(--color-white);
border: 1px solid var(--color-complementary);
color: var(--color-complementary);
}
/* Button to join a channel */
#admin-circle-list>div>div.table>sib-display:nth-child(5)>div>sib-display>div>admin-circle-join-button>sib-form {
background: var(--color-complementary);
border: 1px solid var(--color-complementary);
color: var(--color-white);
}
#admin-circle-list>div>div.table>sib-display:nth-child(5)>div>sib-display>div>admin-circle-join-button>sib-form:hover {
background: var(--color-white);
border: 1px solid var(--color-complementary);
color: var(--color-complementary);
}
#admin-circle-list>div>div.table>sib-display:nth-child(5)>div>sib-display>div>admin-circle-join-button>sib-form:hover input {
color: var(--color-complementary);
}
/* Directory - my profile*/
/* Button to update the avatar */
#sib-picture-browse,
#sib-picture-remove {
background-color: var(--color-white);
border: 1px solid var(--color-complementary);
color: var(--color-complementary);
}
#sib-picture-browse:hover,
#sib-picture-remove:hover {
background-color: var(--color-complementary);
border: 1px solid var(--color-complementary);
color: var(--color-white);
}
{
"xmpp": "https://jabber.happy-dev.fr/http-bind/",
"authority": "http://localhost:8000/",
"endpoints": {
"get": {
"skills": "http://localhost:8000/skills/",
"users": "http://localhost:8000/users/",
"groups": "http://localhost:8000/groups/"
},
"post": {
"skills": "http://localhost:8000/skills/",
"users": "http://localhost:8000/users/",
"groups": "http://localhost:8000/groups/"
}
}
}
{
"xmpp": "https://jabber.happy-dev.fr/http-bind/",
"authority": "http://localhost:8000/",
"authorityName": "djangoldp-server-name",
"endpoints": {
"groups": "http://localhost:8000/groups/",
"skills": "http://localhost:8000/skills/",
"users": "http://localhost:8000/users/"
}
}
"client": {
"name": "Sample of a functional Orbit",
"logo": "https://cdn.startinblox.com/logos/webp/startinblox.webp",
"server": "http://localhost:8000",
"css": "server://clients/sample.css"
},
"components": [{
"type": "registering",
"parameters": {
"dataSrc": "server://open-communities/",
"authority": "http://localhost:8000/",
"authorityName": "dataserver"
},
"route": false
},
{
"type": "notification",
"route": false
},
{
"type": "admin",
"route": false
},
{
"type": "about"
},
{
"type": "communities",
"route": false
},
{
"type": "dashboard",
"parameters": {
"dataSrc": "server://dashboards/"
},
"experimental": [
"routing"
]
},
{
"type": "directory",
"parameters": {
"dataSrc": "federation://users/",
"rangeSkills": "federation://skills/",
"paginateBy": "30",
"uploads": "server://upload/"
},
"route": "members",
"experimental": [
"routing"
]
},
{
"type": "job-board",
"parameters": {
"dataSrc": "federation://job-offers/current/",
"dataSrcExpired": "federation://job-offers/expired/",
"postDataSrc": "server://job-offers/",
"rangeSkills": "federation://skills/"
},
"route": "job-offers",
"experimental": [
"routing"
]
},
{
"type": "projects",
"parameters": {
"captains": "federation://users/",
"circles": "federation://circles/",
"dataSrc": "federation://projects/",
"dataSrcJoinable": "federation://projects/joinable/",
"post": "server://projects/",
"users": "federation://users/",
"noRender": "",
"xmpp": "wss://xmpp-dev.startinblox.com/xmpp-websocket"
}
},
{
"type": "circles",
"parameters": {
"dataSrc": "federation://circles/",
"dataSrcJoinable": "federation://circles/joinable/",
"owners": "federation://users/",
"post": "server://circles/",
"users": "federation://users/",
"xmpp": "wss://xmpp-dev.startinblox.com/xmpp-websocket"
}
},
{
"type": "chat",
"parameters": {
"xmpp": "wss://xmpp-dev.startinblox.com/xmpp-websocket"
},
"route": "messages"
},
{
"type": "analytics",
"parameters": {
"type": "matomo",
"url": "https://matomo.startinblox.com/",
"id": "2"
},
"route": false
}
]
}
\ No newline at end of file
const { defineConfig } = require('cypress')
module.exports = defineConfig({
defaultCommandTimeout: 2000,
chromeWebSecurity: false,
viewportWidth: 1920,
viewportHeight: 1080,
video: false,
screenshotOnRunFailure: false,
e2e: {
baseUrl: 'http://localhost:4173',
},
})
{
"baseUrl": "http://127.0.0.1:3000",
"defaultCommandTimeout": 60000,
"chromeWebSecurity": false,
"viewportWidth": 1920,
"viewportHeight": 1080
}
## Users:
```
- signin
- signup
- create
- listing
- edit
// TO-FIX: Uncomment workaround (blocked by: nested routing bug)
```
## Job Offers:
```
- create
- edit
- listing
// TO-FIX: Search by title and description (blocked by: no search fields available)
- post
// TO-DO: Entire flow (blocked by: no published / unpublished flag)
```
## Channels:
```
- create
- edit
- leave
- retire
- delete
- join
// TO-DO: Join other user created project (blocked by: can't create new user to create a channel)
- invite
// TO-DO
```
## Projects:
```
- create
- edit
- leave
- retire
- delete
// TO-DO: Delete a project (blocked by: no option to delete a project)
- join
// TO-DO: Join other user created project (blocked by: can't create new user to create a project)
- invite
// TO-DO
```
## Breakdown:
```
DONE: 15
TO-FIX: 2
BLOCKED: 4
NOT DONE: 2
```
/// <reference types="Cypress" />
/* globals cy, expect */
context('Create Channel Browser Testing', () => {
before(() => {
cy.clearLocalStorageSnapshot();
cy.clearLocalStorage({ domain: null });
cy.clearCookies({ domain: null });
});
beforeEach(() => cy.restoreLocalStorage());
afterEach(() => cy.saveLocalStorage());
it('should visit user login screen', () => cy.userLogin());
it('should login', () => cy.login());
describe('Channel Creation process #1', () => {
let channelName = 'Test Channel ',
description = 'Test Description ',
subtitle = 'Test Subtitle ';
it('should visit the channel creation screen', () => {
cy.visit('/admin-circles-create');
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/admin-circles-create');
});
});
it('should enter correct channel data', () => {
cy.randomNum().then(num => {
channelName += num;
description += num;
subtitle += num;
cy.get('#admin-circles-create input[name="name"]').clear().type(channelName);
cy.get('#admin-circles-create input[name="name"]').should('have.value', channelName);
cy.get('#admin-circles-create input[name="subtitle"]').clear().type(subtitle);
cy.get('#admin-circles-create input[name="subtitle"]').should('have.value', subtitle);
cy.get('#admin-circles-create [name="description"] [contenteditable="true"]').clear().type(description);
cy.get('#admin-circles-create [name="description"] [contenteditable="true"]').should('have.value', description);
});
});
it('should click on create channel button', () => {
cy.get('#admin-circles-create input[type="submit"]').click();
});
it('should land on channels list screen', () => {
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/admin-circles');
});
});
it('should land newly created channel on channels list screen', () => {
cy.contains('solid-display-value[name="circle.name"]', channelName).should("exist");
cy.fixture('admin.json').then(admin => {
cy.contains('solid-display-value[name="username"]', admin.username).should("exist");
});
});
});
describe('Channel Creation process #2', () => {
let channelName = 'Test Channel ',
description = 'Test Description ',
subtitle = 'Test Subtitle ';
it('should visit the channel creation screen', () => {
cy.visit('/admin-circles-create');
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/admin-circles-create');
});
});
it('should enter correct channel data', () => {
cy.randomNum().then(num => {
channelName += num;
description += num;
subtitle += num;
cy.get('#admin-circles-create input[name="name"]').clear().type(channelName);
cy.get('#admin-circles-create input[name="name"]').should('have.value', channelName);
cy.get('#admin-circles-create input[name="subtitle"]').clear().type(subtitle);
cy.get('#admin-circles-create input[name="subtitle"]').should('have.value', subtitle);
cy.get('#admin-circles-create [name="description"] [contenteditable="true"]').clear().type(description);
cy.get('#admin-circles-create [name="description"] [contenteditable="true"]').should('have.value', description);
});
});
it('should click on create channel button', () => {
cy.get('#admin-circles-create input[type="submit"]').click();
});
it('should land on channels list screen', () => {
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/admin-circles');
});
});
it('should land newly created channel on channels list screen', () => {
cy.contains('solid-display-value[name="circle.name"]', channelName).should("exist");
cy.fixture('admin.json').then(admin => {
cy.contains('solid-display-value[name="username"]', admin.username).should("exist");
});
});
});
describe('Channel Creation process #3', () => {
let channelName = 'Test Channel ',
description = 'Test Description ',
subtitle = 'Test Subtitle ';
it('should visit the channel creation screen', () => {
cy.visit('/admin-circles-create');
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/admin-circles-create');
});
});
it('should enter correct channel data', () => {
cy.randomNum().then(num => {
channelName += num;
description += num;
subtitle += num;
cy.get('#admin-circles-create input[name="name"]').clear().type(channelName);
cy.get('#admin-circles-create input[name="name"]').should('have.value', channelName);
cy.get('#admin-circles-create input[name="subtitle"]').clear().type(subtitle);
cy.get('#admin-circles-create input[name="subtitle"]').should('have.value', subtitle);
cy.get('#admin-circles-create [name="description"] [contenteditable="true"]').clear().type(description);
cy.get('#admin-circles-create [name="description"] [contenteditable="true"]').should('have.value', description);
});
});
it('should click on create channel button', () => {
cy.get('#admin-circles-create input[type="submit"]').click();
});
it('should land on channels list screen', () => {
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/admin-circles');
});
});
it('should land newly created channel on channels list screen', () => {
cy.contains('solid-display-value[name="circle.name"]', channelName).should("exist");
cy.fixture('admin.json').then(admin => {
cy.contains('solid-display-value[name="username"]', admin.username).should("exist");
});
});
});
});
/// <reference types="Cypress" />
/* globals cy, expect */
context('Create Job Offer Browser Testing', () => {
let jobDate = '',
jobTitle = 'Test Job Offer ',
description = 'Test Description ';
before(() => {
cy.nextYear(1).then(year => {
jobDate = year + '-12-31';
});
cy.randomNum().then(num => {
jobTitle += num;
description += num;
});
cy.clearLocalStorageSnapshot();
cy.clearLocalStorage({ domain: null });
cy.clearCookies({ domain: null });
});
beforeEach(() => cy.restoreLocalStorage());
afterEach(() => cy.saveLocalStorage());
it('should visit user login screen', () => cy.userLogin());
it('should login', () => cy.login());
describe('Job Offer Creation process', () => {
it('should visit the job offer creation screen', () => {
cy.visit('/job-offers/job-offers-create');
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/job-offers/job-offers-create');
});
});
it('should enter correct job offer data', () => {
cy.get('#job-offers-create input[name="closingDate"]').clear().type(jobDate);
cy.get('#job-offers-create input[name="closingDate"]').should('have.value', jobDate);
cy.get('#job-offers-create input[name="title"]').clear().type(jobTitle);
cy.get('#job-offers-create input[name="title"]').should('have.value', jobTitle);
cy.get('#job-offers-create textarea[name="description"]').clear().type(description);
cy.get('#job-offers-create textarea[name="description"]').should('have.value', description);
});
it('should click on create job offer button', () => {
cy.get('#job-offers-create input[type="submit"]').click();
});
it('should land on job offers list screen', () => {
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/job-offers');
});
});
it('should land newly created job offer on job offers list screen', () => {
cy.contains('solid-display-value[name="title"]', jobTitle).should("exist");
cy.contains('solid-display-value[name="description"]', description).should("exist");
});
});
});