-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #660 from dadi/feature/visual-tests
Add functional test suite
- Loading branch information
Showing
65 changed files
with
5,429 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,3 +38,6 @@ stats.json | |
jest* | ||
workspace/ | ||
.DS_Store | ||
|
||
test/api/workspace/db | ||
test/functional/output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
{ | ||
"output": "./test/functional/output", | ||
"helpers": { | ||
"Puppeteer": { | ||
"url": "http://localhost:3003", | ||
"show": false, | ||
"restart": false, | ||
"waitForAction": 1000, | ||
"keepBrowserState": true, | ||
"uniqueScreenshotNames": true, | ||
"waitForTimeout": 11000, | ||
"waitForNavigation": "domcontentloaded", | ||
"windowSize": "1425x710", | ||
"chrome": { | ||
"args": [ | ||
"--no-sandbox" | ||
] | ||
} | ||
}, | ||
"Assertions": { | ||
"require": "./test/functional/helpers/assertions_helper.js" | ||
}, | ||
"DataHelper": { | ||
"require": "./test/functional/helpers/data_helper.js" | ||
}, | ||
"Editor": { | ||
"require": "./test/functional/helpers/editor_helper.js" | ||
} | ||
}, | ||
"include": { | ||
"I": "./test/functional/stepDefinitions/steps_file.js", | ||
"articlePage": "./test/functional/pages/Article.js", | ||
"fieldPage": "./test/functional/pages/Field.js", | ||
"homePage": "./test/functional/pages/Home.js", | ||
"loginPage": "./test/functional/pages/Login.js", | ||
"mediaPage": "./test/functional/pages/Media.js", | ||
"profilePage": "./test/functional/pages/Profile.js" | ||
}, | ||
"mocha": { | ||
"reporterOptions": { | ||
"codeceptjs-cli-reporter": { | ||
"stdout": "-", | ||
"options": { | ||
"verbose": false, | ||
"steps": true | ||
} | ||
}, | ||
"mochawesome": { | ||
"stdout": "./test/functional/output/console.log", | ||
"options": { | ||
"reportDir": "./test/functional/output", | ||
"reportFilename": "report" | ||
} | ||
} | ||
} | ||
}, | ||
"bootstrap": "./test/functional/setup.js", | ||
"teardown": "./test/functional/setup.js", | ||
"hooks": [], | ||
"multiple": { | ||
"basic": { | ||
"browsers": [ | ||
"chrome", | ||
"firefox" | ||
] | ||
}, | ||
"parallel": { | ||
"chunks": 2, | ||
"browsers": [ | ||
"chrome" | ||
] | ||
} | ||
}, | ||
"plugins": { | ||
"allure": { | ||
"outputDir": "./test/functional/output/allure", | ||
"enabled": false | ||
}, | ||
"screenshotOnFail": { | ||
"enabled": true | ||
}, | ||
"customEvents": { | ||
"require": "./test/functional/events/index", | ||
"enabled": true | ||
} | ||
}, | ||
"tests": "./test/functional/features/*/*_test.js", | ||
"_tests": "./test/functional/features/*/*_test.js", | ||
"timeout": 10000, | ||
"name": "publish-test" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,43 @@ | ||
{ | ||
"app": { | ||
"name": "DADI Publish Test", | ||
"publisher": "DADI" | ||
}, | ||
"publicUrl": { | ||
"host": "127.0.0.1", | ||
"port": 443, | ||
"protocol": "https" | ||
"name": "DADI Publish", | ||
"publisher": "Publisher Name" | ||
}, | ||
"server": { | ||
"host": "0.0.0.0", | ||
"port": 3000 | ||
"port": 3003 | ||
}, | ||
"apis": [ | ||
{ | ||
"name": "Demo API", | ||
"host": "http://0.0.0.0", | ||
"port": 3001, | ||
"database": "publish", | ||
"version": "1.0" | ||
} | ||
], | ||
"auth": { | ||
"enabled": false | ||
} | ||
} | ||
"apis": [{ | ||
"name": "Publish Test API", | ||
"host": "http://localhost", | ||
"port": 3004, | ||
"menu": [{ | ||
"collections": [ | ||
"pages", | ||
"team" | ||
], | ||
"title": "Content" | ||
}, | ||
{ | ||
"collections": [ | ||
"categories", | ||
"sub-categories", | ||
"milestones" | ||
], | ||
"title": "Taxonomy" | ||
}, | ||
{ | ||
"collections": [ | ||
"field-test-boolean", | ||
"field-test-date", | ||
"field-test-media", | ||
"field-test-other", | ||
"field-test-number", | ||
"field-test-reference", | ||
"field-test-string" | ||
], | ||
"title": "Field Testing" | ||
} | ||
] | ||
}] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"filename":"cache/api/db.json","collections":[{"name":"cache","data":[],"idIndex":[],"binaryIndices":{},"constraints":null,"uniqueNames":[],"transforms":{},"objType":"cache","dirty":false,"cachedIndex":null,"cachedBinaryIndex":null,"cachedData":null,"adaptiveBinaryIndices":true,"transactional":false,"cloneObjects":false,"cloneMethod":"parse-stringify","asyncListeners":false,"disableMeta":false,"disableChangesApi":true,"disableDeltaChangesApi":true,"autoupdate":false,"serializableIndices":true,"ttl":null,"maxId":0,"DynamicViews":[],"events":{"insert":[],"update":[],"pre-insert":[],"pre-update":[],"close":[],"flushbuffer":[],"error":[],"delete":[null],"warning":[null]},"changes":[]}],"databaseVersion":1.5,"engineVersion":1.5,"autosave":true,"autosaveInterval":1000,"autosaveHandle":null,"throttledSaves":true,"options":{"autoload":true,"autosave":true,"autosaveInterval":1000,"serializationMethod":"normal","destructureDelimiter":"$<\n","recursiveWait":true,"recursiveWaitLimit":false,"recursiveWaitLimitDuration":2000,"started":1547565359365},"persistenceMethod":"fs","persistenceAdapter":null,"verbose":false,"events":{"init":[null],"loaded":[],"flushChanges":[],"close":[],"changes":[],"warning":[]},"ENV":"NODEJS"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"cluster": false, | ||
"app": { | ||
"name": "Publish Test API" | ||
}, | ||
"publicUrl": { | ||
"host": "localhost", | ||
"port": 3004, | ||
"protocol": "http" | ||
}, | ||
"server": { | ||
"host": "0.0.0.0", | ||
"port": 3004 | ||
}, | ||
"datastore": "@dadi/api-filestore", | ||
"auth": { | ||
"tokenUrl": "/token", | ||
"tokenTtl": 1800000, | ||
"clientCollection": "client-store", | ||
"tokenCollection": "token-store", | ||
"datastore": "@dadi/api-filestore", | ||
"database": "dadicloud" | ||
}, | ||
"caching": { | ||
"ttl": 1200, | ||
"directory": { | ||
"enabled": false, | ||
"path": "./cache/api", | ||
"extension": "json", | ||
"autoFlush": true, | ||
"autoFlushInterval": 60 | ||
}, | ||
"redis": { | ||
"enabled": false, | ||
"host": "127.0.0.1", | ||
"port": 6379 | ||
} | ||
}, | ||
"paths": { | ||
"collections": "workspace/collections", | ||
"endpoints": "workspace/endpoints", | ||
"hooks": "test/api/workspace/hooks" | ||
}, | ||
"logging": { | ||
"enabled": true, | ||
"level": "debug", | ||
"path": "./log", | ||
"filename": "api", | ||
"extension": "log" | ||
}, | ||
"feedback": false, | ||
"query": { | ||
"useVersionFilter": true | ||
} | ||
} |
Oops, something went wrong.