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: variables:
IMAGE_ORG: pubsweet IMAGE_ORG: pubsweet
IMAGE_NAME: starter IMAGE_NAME: starter
BASE_DOMAIN: gateway.ps.semioticsquares.com
CONFIGURATION_REPOSITORY: https://gitlab.coko.foundation/pubsweet/deployment-config.git
stages: stages:
- build - build
- test - test
- review
- staging
- demo
build: build:
image: docker:stable image: docker:stable
...@@ -66,67 +61,4 @@ lint: ...@@ -66,67 +61,4 @@ lint:
GIT_STRATEGY: none GIT_STRATEGY: none
script: script:
- cd ${HOME} - cd ${HOME}
- npm run lint - npm run lint
\ No newline at end of file
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
...@@ -4,10 +4,13 @@ const components = require('./components.json') ...@@ -4,10 +4,13 @@ const components = require('./components.json')
module.exports = { module.exports = {
'pubsweet-server': { 'pubsweet-server': {
db: {}, db: {
database: 'starter',
},
logger, logger,
port: 3000, port: 3000,
uploads: 'uploads', uploads: 'uploads',
morganLogFormat: 'combined',
}, },
'pubsweet-client': { 'pubsweet-client': {
API_ENDPOINT: '/api', API_ENDPOINT: '/api',
......
...@@ -8,6 +8,8 @@ module.exports = { ...@@ -8,6 +8,8 @@ module.exports = {
baseUrl: deferConfig( baseUrl: deferConfig(
cfg => `http://localhost:${cfg['pubsweet-server'].port}`, cfg => `http://localhost:${cfg['pubsweet-server'].port}`,
), ),
morganLogFormat:
':method :url :status :graphql[operation] :res[content-length] :response-time ms',
}, },
dbManager: { dbManager: {
username: 'admin', username: 'admin',
......
...@@ -34,7 +34,7 @@ test('Manage posts journey', async t => { ...@@ -34,7 +34,7 @@ test('Manage posts journey', async t => {
.typeText(managePosts.newPostInput, postTitle) .typeText(managePosts.newPostInput, postTitle)
.click(managePosts.newPostButton) .click(managePosts.newPostButton)
.expect(managePosts.postTitle(0).innerText) .expect(managePosts.postTitle(0).innerText)
.eql(`${postTitle}\n`) .match(new RegExp(`^${postTitle}`))
// publish it // publish it
await t 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