Commit fc48e11f authored by Guilhem CARRON's avatar Guilhem CARRON
Browse files

Merge branch 'fix/test-version-fixed' into 'dev'

Fix(alpha): Fix alpha issue with oauth konnectors !!!

See merge request web-et-numerique/llle_project/ecolyo!492
parents c9dad5d5 c5ffee2c
......@@ -12,7 +12,8 @@ module.exports = {
new webpack.HashedModuleIdsPlugin(),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('development'), // to compile on production mode (redux)
'process.env.NODE_ENV': JSON.stringify('production'), // to compile on production mode (redux)
'process.env.IS_ALPHA': JSON.stringify('true'),
__DEVELOPMENT__: false,
__DEVTOOLS__: false,
__STACK_ASSETS__: target !== 'mobile',
......
......@@ -18,6 +18,7 @@ const stackProvidedLibsConfig = {
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('development'),
'process.env.IS_ALPHA': JSON.stringify('true'), //set this variable true for dev so tests runs with alpha variable
__STACK_ASSETS__: true,
}),
],
......
......@@ -33,7 +33,7 @@ const configs = [
require(`cozy-scripts/config/webpack.target.${target}`),
]
if (environment === 'production') {
if (environment === 'production' && process.env.IS_ALPHA !== 'true') {
configs.push(require('cozy-scripts/config/webpack.environment.prod'))
} else {
configs.push(require('./app.config.environment.dev'))
......
......@@ -90,7 +90,7 @@ describe('FeedbackModal functionnalities', () => {
email: 'ecolyo@grandlyon.com',
},
],
subject: '[Ecolyo - alpha] - Feedbacks - feedback.type_bug',
subject: '[Ecolyo] - Feedbacks - feedback.type_bug',
attachments: [],
parts: [
{
......
......@@ -14,19 +14,22 @@ describe('Environement service', () => {
describe('isProduction method', () => {
it('should return true', async () => {
process.env.IS_ALPHA = 'toto'
process.env.NODE_ENV = 'production'
const result = environementService.isProduction()
expect(result).toEqual(true)
})
it('should return false, developement case', async () => {
process.env.IS_ALPHA = 'true'
process.env.NODE_ENV = 'development'
const result = environementService.isProduction()
expect(result).toEqual(false)
})
it('should return false, non existing case', async () => {
process.env.NODE_ENV = 'toto'
it('should return false, alpha case', async () => {
process.env.IS_ALPHA = 'true'
process.env.NODE_ENV = 'production'
const result = environementService.isProduction()
expect(result).toEqual(false)
})
......
export default class EnvironementService {
private getEnvironement() {
return process.env.NODE_ENV
private isAlpha() {
return process.env.IS_ALPHA
}
public isProduction() {
if (this.getEnvironement() === 'production') {
if (this.isAlpha() !== 'true') {
return true
}
return false
}
public getPublicURL() {
if (this.getEnvironement() === 'production') {
if (this.isAlpha() !== 'true') {
return 'https://ecolyo-agent.grandlyon.com'
} else {
return 'https://ecolyo-agent-rec.grandlyon.com'
......
......@@ -13,56 +13,67 @@
/** App colors **/
/** TABS GRADIENT **/
/** SCROLLBAR **/
@import url("https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap");
/* line 4, src/styles/base/_layout.scss */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap');
/* line 5, src/styles/base/_layout.scss */
html {
background: #1b1c22; }
background: #1b1c22;
}
/* line 8, src/styles/base/_layout.scss */
/* line 9, src/styles/base/_layout.scss */
body {
background: #1b1c22;
overflow: unset !important; }
overflow: unset !important;
}
/* line 13, src/styles/base/_layout.scss */
/* line 14, src/styles/base/_layout.scss */
.column {
display: flex;
flex-direction: column; }
flex-direction: column;
}
/* line 18, src/styles/base/_layout.scss */
/* line 19, src/styles/base/_layout.scss */
.row {
display: flex;
flex-direction: row; }
flex-direction: row;
}
/* line 23, src/styles/base/_layout.scss */
/* line 24, src/styles/base/_layout.scss */
.cozy-bar {
width: 100%;
display: flex;
align-items: center;
justify-content: center; }
justify-content: center;
}
/* line 30, src/styles/base/_layout.scss */
/* line 31, src/styles/base/_layout.scss */
[role='banner'] .coz-bar-container {
background-color: #ffffff; }
@media only screen and (max-width: 768px) {
/* line 30, src/styles/base/_layout.scss */
[role='banner'] .coz-bar-container {
padding: 0 0 0 0;
background-color: unset; } }
/* line 38, src/styles/base/_layout.scss */
background-color: #ffffff;
}
@media only screen and (max-width: 768px) {
/* line 31, src/styles/base/_layout.scss */
[role='banner'] .coz-bar-container {
padding: 0 0 0 0;
background-color: unset;
}
}
/* line 39, src/styles/base/_layout.scss */
.coz-bar-wrapper {
box-shadow: unset !important;
background: unset !important; }
background: unset !important;
}
/* line 42, src/styles/base/_layout.scss */
/* line 43, src/styles/base/_layout.scss */
.cv-button {
width: 4.25rem; }
width: 4.25rem;
}
/* line 45, src/styles/base/_layout.scss */
/* line 46, src/styles/base/_layout.scss */
.coz-label {
color: #32363f; }
color: #32363f;
}
/* line 49, src/styles/base/_layout.scss */
/* line 50, src/styles/base/_layout.scss */
.header {
display: flex;
align-items: center;
......@@ -72,65 +83,88 @@ body {
z-index: 18;
position: fixed;
top: 48px;
left: 0; }
@media only screen and (max-width: 768px) {
/* line 49, src/styles/base/_layout.scss */
.header {
top: 0; } }
/* line 62, src/styles/base/_layout.scss */
.header .header-top {
background: radial-gradient(74.83% 76.97% at 50% 13.64%, #343641 0%, #1b1c22 100%);
width: 100%; }
/* line 69, src/styles/base/_layout.scss */
.header .header-top .header-text {
padding: 0 1rem 1rem 1rem;
color: #e0e0e0; }
/* line 74, src/styles/base/_layout.scss */
left: 0;
}
@media only screen and (max-width: 768px) {
/* line 50, src/styles/base/_layout.scss */
.header {
top: 0;
}
}
/* line 63, src/styles/base/_layout.scss */
.header .header-top {
background: radial-gradient(
74.83% 76.97% at 50% 13.64%,
#343641 0%,
#1b1c22 100%
);
width: 100%;
}
/* line 70, src/styles/base/_layout.scss */
.header .header-top .header-text {
padding: 0 1rem 1rem 1rem;
color: #e0e0e0;
}
/* line 75, src/styles/base/_layout.scss */
.header .header-content {
margin: 0 0 0 220px;
display: flex;
flex-direction: column;
}
@media only screen and (max-width: 1023px) {
/* line 75, src/styles/base/_layout.scss */
.header .header-content {
margin: 0 0 0 220px;
display: flex;
flex-direction: column; }
@media only screen and (max-width: 1023px) {
/* line 74, src/styles/base/_layout.scss */
.header .header-content {
margin: 0; } }
@media only screen and (max-width: 768px) {
/* line 74, src/styles/base/_layout.scss */
.header .header-content {
margin: 60px 0 0 0; } }
/* line 84, src/styles/base/_layout.scss */
.header .header-content .header-content-top {
display: flex;
flex-direction: row; }
/* line 87, src/styles/base/_layout.scss */
.header .header-content .header-content-top.header-content-top-right {
justify-content: flex-end; }
/* line 90, src/styles/base/_layout.scss */
.header .header-content .header-content-top .header-text {
padding: 2rem 1rem;
flex: 1; }
/* line 94, src/styles/base/_layout.scss */
.header .header-content .header-content-top .header-text-desktop {
display: flex;
flex: 1;
padding: 2rem 1.25rem;
color: #e0e0e0; }
/* line 100, src/styles/base/_layout.scss */
.header .header-content .header-content-top .header-back-button {
padding: 0 0.75rem; }
@media only screen and (max-width: 768px) {
/* line 104, src/styles/base/_layout.scss */
.header .header-content .header-content-top .header-text {
padding: 0 1rem 1rem 1rem;
color: #e0e0e0; }
/* line 108, src/styles/base/_layout.scss */
.header .header-content .header-content-top .header-text-desktop {
display: none; }
/* line 111, src/styles/base/_layout.scss */
.header .header-content .header-content-top .header-feedbacks-button {
display: none; } }
/* line 119, src/styles/base/_layout.scss */
margin: 0;
}
}
@media only screen and (max-width: 768px) {
/* line 75, src/styles/base/_layout.scss */
.header .header-content {
margin: 60px 0 0 0;
}
}
/* line 85, src/styles/base/_layout.scss */
.header .header-content .header-content-top {
display: flex;
flex-direction: row;
}
/* line 88, src/styles/base/_layout.scss */
.header .header-content .header-content-top.header-content-top-right {
justify-content: flex-end;
}
/* line 91, src/styles/base/_layout.scss */
.header .header-content .header-content-top .header-text {
padding: 2rem 1rem;
flex: 1;
}
/* line 95, src/styles/base/_layout.scss */
.header .header-content .header-content-top .header-text-desktop {
display: flex;
flex: 1;
padding: 2rem 1.25rem;
color: #e0e0e0;
}
/* line 101, src/styles/base/_layout.scss */
.header .header-content .header-content-top .header-back-button {
padding: 0 0.75rem;
}
@media only screen and (max-width: 768px) {
/* line 105, src/styles/base/_layout.scss */
.header .header-content .header-content-top .header-text {
padding: 0 1rem 1rem 1rem;
color: #e0e0e0;
}
/* line 109, src/styles/base/_layout.scss */
.header .header-content .header-content-top .header-text-desktop {
display: none;
}
/* line 112, src/styles/base/_layout.scss */
.header .header-content .header-content-top .header-feedbacks-button {
display: none;
}
}
/* line 120, src/styles/base/_layout.scss */
.content-view-loading {
height: 80vh;
width: 100%;
......@@ -138,31 +172,38 @@ body {
flex-direction: column;
justify-content: center;
align-items: center;
color: #e0e0e0; }
/* line 127, src/styles/base/_layout.scss */
.content-view-loading .content-view-loading-text {
padding-top: 1rem;
margin: 0 2rem;
text-align: center; }
/* line 132, src/styles/base/_layout.scss */
.content-view-loading .content-view-loading-button {
max-width: 50vw;
margin-top: 1rem; }
/* line 138, src/styles/base/_layout.scss */
color: #e0e0e0;
}
/* line 128, src/styles/base/_layout.scss */
.content-view-loading .content-view-loading-text {
padding-top: 1rem;
margin: 0 2rem;
text-align: center;
}
/* line 133, src/styles/base/_layout.scss */
.content-view-loading .content-view-loading-button {
max-width: 50vw;
margin-top: 1rem;
}
/* line 139, src/styles/base/_layout.scss */
[role='main'] {
/* width */
/* Track */
/* Handle */ }
/* line 140, src/styles/base/_layout.scss */
[role='main']::-webkit-scrollbar {
width: 10px; }
/* line 144, src/styles/base/_layout.scss */
[role='main']::-webkit-scrollbar-track {
background: #3e4045; }
/* line 148, src/styles/base/_layout.scss */
[role='main']::-webkit-scrollbar-thumb {
background: #6f7074; }
/* Handle */
}
/* line 141, src/styles/base/_layout.scss */
[role='main']::-webkit-scrollbar {
width: 10px;
}
/* line 145, src/styles/base/_layout.scss */
[role='main']::-webkit-scrollbar-track {
background: #3e4045;
}
/* line 149, src/styles/base/_layout.scss */
[role='main']::-webkit-scrollbar-thumb {
background: #6f7074;
}
/** BLACK **/
/** RED **/
......@@ -186,7 +227,8 @@ body {
/** SCROLLBAR **/
/* line 5, src/styles/base/_typography.scss */
* {
font-family: Lato, sans-serif; }
font-family: Lato, sans-serif;
}
/* line 9, src/styles/base/_typography.scss */
h1,
......@@ -197,7 +239,8 @@ h5,
h6,
p {
color: #a0a0a0;
font-family: Lato, sans-serif; }
font-family: Lato, sans-serif;
}
/* line 20, src/styles/base/_typography.scss */
.home-title {
......@@ -206,7 +249,8 @@ p {
font-style: normal;
font-weight: normal;
line-height: 120%;
text-transform: uppercase; }
text-transform: uppercase;
}
/* line 29, src/styles/base/_typography.scss */
.app-title {
......@@ -218,349 +262,579 @@ p {
text-align: center;
letter-spacing: 0.15px;
color: #e0e0e0;
text-shadow: 0px -1px 0px #060609, 0px 1px 0px rgba(255, 255, 255, 0.07); }
text-shadow: 0px -1px 0px #060609, 0px 1px 0px rgba(255, 255, 255, 0.07);
}
/* line 41, src/styles/base/_typography.scss */
.isBuilding {
color: #e3b82a;
margin-left: .8rem;
margin-right: .8rem; }
margin-left: 0.8rem;
margin-right: 0.8rem;
}
/* line 48, src/styles/base/_typography.scss */
.text-10, .text-10-normal, .text-10-normal-uppercase, .text-10-normal-150, .text-10-bold, .text-10-bold-uppercase, .text-10-bold-capitalize, .text-10-italic {
.text-10,
.text-10-normal,
.text-10-normal-uppercase,
.text-10-normal-150,
.text-10-bold,
.text-10-bold-uppercase,
.text-10-bold-capitalize,
.text-10-italic {
font-style: normal;
font-size: 0.625rem;
line-height: 120%; }
/* line 52, src/styles/base/_typography.scss */
.text-10-normal, .text-10-normal-uppercase, .text-10-normal-150 {
font-weight: normal; }
/* line 55, src/styles/base/_typography.scss */
.text-10-normal-uppercase {
text-transform: uppercase; }
/* line 59, src/styles/base/_typography.scss */
.text-10-normal-150 {
line-height: 150%; }
/* line 64, src/styles/base/_typography.scss */
.text-10-bold, .text-10-bold-uppercase, .text-10-bold-capitalize {
font-weight: 700; }
/* line 67, src/styles/base/_typography.scss */
.text-10-bold-uppercase {
text-transform: uppercase; }
/* line 71, src/styles/base/_typography.scss */
.text-10-bold-capitalize {
text-transform: capitalize; }
/* line 76, src/styles/base/_typography.scss */
.text-10-italic {
font-style: italic;
font-weight: normal; }
line-height: 120%;
}
/* line 52, src/styles/base/_typography.scss */
.text-10-normal,
.text-10-normal-uppercase,
.text-10-normal-150 {
font-weight: normal;
}
/* line 55, src/styles/base/_typography.scss */
.text-10-normal-uppercase {
text-transform: uppercase;
}
/* line 59, src/styles/base/_typography.scss */
.text-10-normal-150 {
line-height: 150%;
}
/* line 64, src/styles/base/_typography.scss */
.text-10-bold,
.text-10-bold-uppercase,
.text-10-bold-capitalize {
font-weight: 700;
}
/* line 67, src/styles/base/_typography.scss */
.text-10-bold-uppercase {
text-transform: uppercase;
}
/* line 71, src/styles/base/_typography.scss */
.text-10-bold-capitalize {
text-transform: capitalize;
}
/* line 76, src/styles/base/_typography.scss */
.text-10-italic {
font-style: italic;
font-weight: normal;
}
/* line 48, src/styles/base/_typography.scss */
.text-14, .text-14-normal, .text-14-normal-uppercase, .text-14-normal-150, .text-14-bold, .text-14-bold-uppercase, .text-14-bold-capitalize, .text-14-italic {
.text-14,
.text-14-normal,
.text-14-normal-uppercase,
.text-14-normal-150,
.text-14-bold,
.text-14-bold-uppercase,
.text-14-bold-capitalize,
.text-14-italic {
font-style: normal;
font-size: 0.875rem;
line-height: 120%; }
/* line 52, src/styles/base/_typography.scss */
.text-14-normal, .text-14-normal-uppercase, .text-14-normal-150 {
font-weight: normal; }
/* line 55, src/styles/base/_typography.scss */
.text-14-normal-uppercase {
text-transform: uppercase; }
/* line 59, src/styles/base/_typography.scss */
.text-14-normal-150 {
line-height: 150%; }
/* line 64, src/styles/base/_typography.scss */
.text-14-bold, .text-14-bold-uppercase, .text-14-bold-capitalize {
font-weight: 700; }
/* line 67, src/styles/base/_typography.scss */
.text-14-bold-uppercase {
text-transform: uppercase; }
/* line 71, src/styles/base/_typography.scss */
.text-14-bold-capitalize {
text-transform: capitalize; }
/* line 76, src/styles/base/_typography.scss */
.text-14-italic {
font-style: italic;
font-weight: normal; }
line-height: 120%;
}
/* line 52, src/styles/base/_typography.scss */
.text-14-normal,
.text-14-normal-uppercase,
.text-14-normal-150 {
font-weight: normal;
}
/* line 55, src/styles/base/_typography.scss */
.text-14-normal-uppercase {
text-transform: uppercase;
}
/* line 59, src/styles/base/_typography.scss */
.text-14-normal-150 {
line-height: 150%;
}
/* line 64, src/styles/base/_typography.scss */
.text-14-bold,
.text-14-bold-uppercase,
.text-14-bold-capitalize {
font-weight: 700;
}
/* line 67, src/styles/base/_typography.scss */
.text-14-bold-uppercase {
text-transform: uppercase;
}
/* line 71, src/styles/base/_typography.scss */
.text-14-bold-capitalize {
text-transform: capitalize;
}
/* line 76, src/styles/base/_typography.scss */
.text-14-italic {
font-style: italic;
font-weight: normal;
}
/* line 48, src/styles/base/_typography.scss */
.text-15, .text-15-normal, .text-15-normal-uppercase, .text-15-normal-150, .text-15-bold, .text-15-bold-uppercase, .text-15-bold-capitalize, .text-15-italic {
.text-15,
.text-15-normal,
.text-15-normal-uppercase,
.text-15-normal-150,
.text-15-bold,
.text-15-bold-uppercase,
.text-15-bold-capitalize,
.text-15-italic {
font-style: normal;
font-size: 0.938rem;
line-height: 120%; }
/* line 52, src/styles/base/_typography.scss */
.text-15-normal, .text-15-normal-uppercase, .text-15-normal-150 {
font-weight: normal; }
/* line 55, src/styles/base/_typography.scss */
.text-15-normal-uppercase {
text-transform: uppercase; }
/* line 59, src/styles/base/_typography.scss */
.text-15-normal-150 {
line-height: 150%; }
/* line 64, src/styles/base/_typography.scss */
.text-15-bold, .text-15-bold-uppercase, .text-15-bold-capitalize {
font-weight: 700; }
/* line 67, src/styles/base/_typography.scss */
.text-15-bold-uppercase {
text-transform: uppercase; }
/* line 71, src/styles/base/_typography.scss */
.text-15-bold-capitalize {
text-transform: capitalize; }
/* line 76, src/styles/base/_typography.scss */
.text-15-italic {
font-style: italic;
font-weight: normal; }
line-height: 120%;
}
/* line 52, src/styles/base/_typography.scss */
.text-15-normal,
.text-15-normal-uppercase,
.text-15-normal-150 {
font-weight: normal;
}
/* line 55, src/styles/base/_typography.scss */
.text-15-normal-uppercase {
text-transform: uppercase;
}
/* line 59, src/styles/base/_typography.scss */
.text-15-normal-150 {
line-height: 150%;
}