[Tests-Only] do not restore settings value in ui tests
This commit is contained in:
3 files changed
+1
-38
No files matched your search
@@ -673,7 +673,6 @@ def settingsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
|
|||||||
"NODE_TLS_REJECT_UNAUTHORIZED": 0,
|
"NODE_TLS_REJECT_UNAUTHORIZED": 0,
|
||||||
"WEB_PATH": "/srv/app/web",
|
"WEB_PATH": "/srv/app/web",
|
||||||
"FEATURE_PATH": "/drone/src/settings/ui/tests/acceptance/features",
|
"FEATURE_PATH": "/drone/src/settings/ui/tests/acceptance/features",
|
||||||
"OCIS_SETTINGS_STORE": "/srv/app/tmp/ocis/settings",
|
|
||||||
},
|
},
|
||||||
"commands": [
|
"commands": [
|
||||||
". /drone/src/.drone.env",
|
". /drone/src/.drone.env",
|
||||||
|
|||||||
@@ -1,15 +1,10 @@
|
|||||||
const path = require('path')
|
const path = require('path')
|
||||||
const WEB_PATH = process.env.WEB_PATH
|
const WEB_PATH = process.env.WEB_PATH
|
||||||
const TEST_INFRA_DIRECTORY = process.env.TEST_INFRA_DIRECTORY
|
const TEST_INFRA_DIRECTORY = process.env.TEST_INFRA_DIRECTORY
|
||||||
const OCIS_SETTINGS_STORE = process.env.OCIS_SETTINGS_STORE || '/var/tmp/ocis/settings'
|
|
||||||
|
|
||||||
const config = require(path.join(WEB_PATH, 'nightwatch.conf.js'))
|
const config = require(path.join(WEB_PATH, 'nightwatch.conf.js'))
|
||||||
|
|
||||||
config.page_objects_path = [TEST_INFRA_DIRECTORY + '/acceptance/pageObjects', 'ui/tests/acceptance/pageobjects']
|
config.page_objects_path = [TEST_INFRA_DIRECTORY + '/acceptance/pageObjects', 'ui/tests/acceptance/pageobjects']
|
||||||
config.custom_commands_path = TEST_INFRA_DIRECTORY + '/acceptance/customCommands'
|
config.custom_commands_path = TEST_INFRA_DIRECTORY + '/acceptance/customCommands'
|
||||||
|
|
||||||
config.test_settings.default.globals = { ...config.test_settings.default.globals, settings_store: OCIS_SETTINGS_STORE }
|
module.exports = config
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
...config
|
|
||||||
}
|
|
||||||
@@ -42,34 +42,3 @@ Then('the files header should be displayed in language {string}', async function
|
|||||||
const expected = languageHelper.getFilesHeaderMenuForLanguage(language)
|
const expected = languageHelper.getFilesHeaderMenuForLanguage(language)
|
||||||
assert.deepStrictEqual(items, expected, 'the menu list were not same')
|
assert.deepStrictEqual(items, expected, 'the menu list were not same')
|
||||||
})
|
})
|
||||||
|
|
||||||
After(async function () {
|
|
||||||
let directory = path.join(client.globals.settings_store, 'assignments')
|
|
||||||
try {
|
|
||||||
fs.readdirSync(directory).map(element => {
|
|
||||||
if (!initialLanguageAssignments.includes(element)) {
|
|
||||||
fs.unlinkSync(path.join(client.globals.settings_store, 'assignments', element))
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} catch (err) {
|
|
||||||
console.log('Error while reading the settings values from file system... ')
|
|
||||||
}
|
|
||||||
|
|
||||||
directory = path.join(client.globals.settings_store, 'values')
|
|
||||||
try {
|
|
||||||
fs.emptyDirSync(directory)
|
|
||||||
} catch (err) {
|
|
||||||
console.log('Error while cleaning the settings values from file system... ')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
Before(async function() {
|
|
||||||
const directory = path.join(client.globals.settings_store, 'assignments')
|
|
||||||
try {
|
|
||||||
fs.readdirSync(directory).map(element => {
|
|
||||||
initialLanguageAssignments.push(element)
|
|
||||||
})
|
|
||||||
} catch (err) {
|
|
||||||
console.log('Error while reading the settings values from file system... ')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
Reference in new issue
Block a user