Commit dc7fb953 authored by Jure's avatar Jure

Merge branch 'master' into 'log-format'

# Conflicts:
#   config/default.js
parents df9a9771 23f03584
Pipeline #8202 passed with stages
in 9 minutes and 34 seconds
variables:
IMAGE_ORG: pubsweet
IMAGE_NAME: starter
BASE_DOMAIN: gateway.ps.semioticsquares.com
CONFIGURATION_REPOSITORY: https://gitlab.coko.foundation/pubsweet/deployment-config.git
stages:
- build
- test
- review
- staging
- demo
build:
image: docker:stable
......@@ -66,67 +61,4 @@ lint:
GIT_STRATEGY: none
script:
- cd ${HOME}
- npm run lint
review:
image: pubsweet/deployer:latest
stage: review
variables:
PACKAGE_NAME: starter
FORCE_FRESH_DB: "yes"
REQUIRES_PROVISIONING: "yes"
environment:
name: $PACKAGE_NAME/review/$CI_COMMIT_REF_NAME
# !! kube-lego will fail if domain > 63 chars
url: "http://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
on_stop: stop_review
except:
- master
script:
- source deploy.sh
- create_deployment
stop_review:
image: pubsweet/deployer:latest
stage: review
variables:
PACKAGE_NAME: starter
REQUIRES_PROVISIONING: "yes"
GIT_STRATEGY: none
environment:
name: $PACKAGE_NAME/review/$CI_COMMIT_REF_NAME
action: stop
when: manual
except:
- master
script:
- source deploy.sh
- delete_deployment
- delete_objects_in_environment pvc
staging:
image: pubsweet/deployer:latest
stage: staging
variables:
PACKAGE_NAME: starter
environment:
name: $PACKAGE_NAME/staging
url: "https://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
only:
- master
script:
- source deploy.sh
- create_deployment
demo:
image: pubsweet/deployer:latest
stage: demo
variables:
PACKAGE_NAME: starter
environment:
name: $PACKAGE_NAME/demo
url: "https://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
when: manual
script:
- source deploy.sh
- create_deployment
- npm run lint
\ No newline at end of file
......@@ -4,7 +4,7 @@ import { Route, Switch } from 'react-router-dom'
// Manage
import PostsManager from 'pubsweet-component-posts-manager/PostsManagerContainer'
import UsersManager from 'pubsweet-component-users-manager/UsersManagerContainer'
import TeamsManager from 'pubsweet-component-teams-manager/TeamsManagerContainer'
import TeamsManager from 'pubsweet-component-teams-manager/src/TeamsManagerContainer'
// Editor
import MediumDraft from 'pubsweet-component-medium-draft/MediumDraftContainer'
......
......@@ -4,7 +4,9 @@ const components = require('./components.json')
module.exports = {
'pubsweet-server': {
db: {},
db: {
database: 'starter',
},
logger,
port: 3000,
uploads: 'uploads',
......
......@@ -2,7 +2,12 @@
"name": "@pubsweet/starter",
"version": "1.0.0-alpha.1",
"description": "A new pubsweet app",
"files": ["app", "config", "static", "webpack"],
"files": [
"app",
"config",
"static",
"webpack"
],
"main": "app.js",
"dependencies": {
"@pubsweet/db-manager": "^1.0.0",
......@@ -26,7 +31,7 @@
"pubsweet-component-signup": "^1.0.1",
"pubsweet-component-teams-manager": "^1.0.1",
"pubsweet-component-users-manager": "^1.0.1",
"pubsweet-server": "^2.0.0",
"pubsweet-server": "^7.2.0",
"pubsweet-theme-plugin": "^0.0.3",
"react-router-redux": "next"
},
......@@ -74,8 +79,8 @@
"smtp-server": "^3.3.0",
"string-replace-loader": "^1.2.0",
"style-loader": "^0.21.0",
"testcafe": "^0.19.2",
"testcafe-react-selectors": "^1.0.5",
"testcafe": "^0.20.5",
"testcafe-react-selectors": "^2.0.0",
"url-loader": "^0.6.2",
"webpack": "^3.11.0",
"webpack-hot-middleware": "^2.22.1"
......@@ -88,8 +93,7 @@
"setupdb": "pubsweet setupdb",
"create:collection": "node scripts/add-collection.js",
"precommit": "lint-staged",
"test":
"NODE_ENV=test NODE_PRESERVE_SYMLINKS=1 testcafe chrome 'test/**/*.test.js'"
"test": "NODE_ENV=test NODE_PRESERVE_SYMLINKS=1 testcafe chrome 'test/**/*.test.js'"
},
"repository": "https://gitlab.coko.foundation/pubsweet/pubsweet-starter",
"license": "MIT"
......
......@@ -71,9 +71,6 @@ test('Manage teams journey', async t => {
// delete it
await t
.click(manageTeams.teamDelete(0))
// TODO remove reload workaround once reducer bug fix is published
// https://gitlab.coko.foundation/pubsweet/pubsweet-client/merge_requests/127
.navigateTo(manageTeams.url)
.expect(manageTeams.team(0).exists)
.notOk()
})
......
import config from 'config'
import { Selector, t } from 'testcafe'
import ReactSelector from 'testcafe-react-selectors'
import { ReactSelector } from 'testcafe-react-selectors'
const login = {
url: `${config.get('pubsweet-server.baseUrl')}/login`,
......
import config from 'config'
import ReactSelector from 'testcafe-react-selectors'
import { ReactSelector } from 'testcafe-react-selectors'
const managePosts = {
url: `${config.get('pubsweet-server.baseUrl')}/manage/posts`,
......
import config from 'config'
import ReactSelector from 'testcafe-react-selectors'
import { ReactSelector } from 'testcafe-react-selectors'
const manageTeams = {
url: `${config.get('pubsweet-server.baseUrl')}/manage/teams`,
......@@ -12,12 +12,12 @@ const manageTeams = {
.team(n)
.find('td')
.nth(1),
teamDelete: n => manageTeams.team(n).find('button'),
teamDelete: n => manageTeams.team(n).findReact('Button'),
teamName: ReactSelector('TeamCreator FormControl'),
teamType: ReactSelector('TeamCreator Select').nth(0),
collection: ReactSelector('TeamCreator Select').nth(1),
option: ReactSelector('TeamCreator Select Option'),
teamName: ReactSelector('TeamCreator TextField'),
teamType: ReactSelector('TeamCreator Menu').nth(0),
collection: ReactSelector('TeamCreator Menu').nth(1),
option: ReactSelector('TeamCreator Menu').findReact('DefaultMenuOption'),
create: ReactSelector('TeamCreator Button'),
}
......
import config from 'config'
import ReactSelector from 'testcafe-react-selectors'
import { ReactSelector } from 'testcafe-react-selectors'
const manageUsers = {
url: `${config.get('pubsweet-server.baseUrl')}/manage/users`,
......
import config from 'config'
import { Selector } from 'testcafe'
import { ReactSelector } from 'testcafe-react-selectors'
const passwordReset = {
url: `${config.get('pubsweet-server.baseUrl')}/password-reset`,
title: Selector('h1'),
title: ReactSelector('PasswordReset h1'),
username: Selector('form input[type=text]'),
password: Selector('form input[type=password]'),
submit: Selector('form button'),
username: ReactSelector('PasswordReset').find('form input[type=text]'),
password: ReactSelector('PasswordReset').find('form input[type=password]'),
submit: ReactSelector('PasswordReset').find('form button'),
alert: Selector('.alert'),
alert: ReactSelector('PasswordReset'),
}
export default passwordReset
import config from 'config'
import { Selector } from 'testcafe'
import { ReactSelector } from 'testcafe-react-selectors'
const signup = {
url: `${config.get('pubsweet-server.baseUrl')}/signup`,
title: Selector('div[class^=Signup-local_title]'),
title: ReactSelector('Signup').find('h1'),
username: Selector('form input[type=text]'),
email: Selector('form input[type=email]'),
password: Selector('form input[type=password]'),
submit: Selector('form button'),
login: Selector('form a'),
username: ReactSelector('Signup').find('form input[type=text]'),
email: ReactSelector('Signup').find('form input[type=email]'),
password: ReactSelector('Signup').find('form input[type=password]'),
submit: ReactSelector('Signup').findReact('Button'),
login: ReactSelector('Singup').findReact('Link'),
}
export default signup
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment