Commit 69a43f9b authored by Jure's avatar Jure

test: fix tests

parents ffc23acf db83a27d
Pipeline #9070 failed with stages
in 8 minutes and 29 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,10 +4,13 @@ const components = require('./components.json')
module.exports = {
'pubsweet-server': {
db: {},
db: {
database: 'starter',
},
logger,
port: 3000,
uploads: 'uploads',
morganLogFormat: 'combined',
},
'pubsweet-client': {
API_ENDPOINT: '/api',
......
......@@ -8,6 +8,8 @@ module.exports = {
baseUrl: deferConfig(
cfg => `http://localhost:${cfg['pubsweet-server'].port}`,
),
morganLogFormat:
':method :url :status :graphql[operation] :res[content-length] :response-time ms',
},
dbManager: {
username: 'admin',
......
......@@ -34,7 +34,7 @@ test('Manage posts journey', async t => {
.typeText(managePosts.newPostInput, postTitle)
.click(managePosts.newPostButton)
.expect(managePosts.postTitle(0).innerText)
.eql(`${postTitle}\n`)
.match(new RegExp(`^${postTitle}`))
// publish it
await t
......
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