Verified Commit 450de91e authored by Chocobozzz's avatar Chocobozzz
Browse files

Fix E2E tests

parent 17e2705f
......@@ -39,7 +39,7 @@ export class MyAccountPage {
await container.$('.dropdown-toggle').click()
const dropdownMenu = () => container.$('.dropdown-menu .dropdown-item:nth-child(2)')
const dropdownMenu = () => container.$$('.dropdown-menu .dropdown-item')[1]
await dropdownMenu().waitForDisplayed()
return dropdownMenu().click()
......
......@@ -4,6 +4,9 @@ const prefs = {
'intl.accept_languages': 'en'
}
// Chrome headless does not support prefs
process.env.LANG = 'en'
module.exports = {
config: {
...mainConfig,
......@@ -18,6 +21,7 @@ module.exports = {
browserName: 'chrome',
acceptInsecureCerts: true,
'goog:chromeOptions': {
args: [ '--headless', '--disable-gpu', '--window-size=1280,1024' ],
prefs
}
}
......
......@@ -3,6 +3,7 @@ import { config as mainConfig } from './wdio.main.conf'
const prefs = {
'intl.accept_languages': 'en'
}
process.env.LANG = 'en'
module.exports = {
config: {
......@@ -16,6 +17,7 @@ module.exports = {
{
browserName: 'chrome',
'goog:chromeOptions': {
args: [ '--headless', '--disable-gpu', '--window-size=1280,1024' ],
prefs
}
},
......@@ -23,6 +25,8 @@ module.exports = {
browserName: 'firefox',
'moz:firefoxOptions': {
binary: '/usr/bin/firefox-developer-edition',
args: [ '--headless', '--window-size=1280,1024' ],
prefs
}
}
......
......@@ -335,6 +335,11 @@ class ClientHtml {
lang = req.acceptsLanguages(POSSIBLE_LOCALES) || getDefaultLocale()
}
logger.debug(
'Serving %s HTML language', buildFileLocale(lang),
{ cookie: req.cookies?.clientLanguage, paramLang, acceptLanguage: req.headers['accept-language'] }
)
return join(__dirname, '../../../client/dist/' + buildFileLocale(lang) + '/index.html')
}
......
......@@ -7,7 +7,6 @@ import {
cleanupTests,
createMultipleServers,
doubleFollow,
expectNoFailedTranscodingJob,
expectStartWith,
makeRawRequest,
ObjectStorageCommand,
......
......@@ -13,7 +13,7 @@ NODE_APP_INSTANCE=6 NODE_ENV=test npm run start
* Run `rm -rf node_modules && rm -rf client/node_modules && yarn install --pure-lockfile && npm run build` to see if all the supported languages compile correctly
* Update https://peertube2.cpy.re and check it works correctly
* Check CI tests are green
* Run BrowserStack and local E2E tests
* Run BrowserStack **and** local E2E tests
* Release: `GITHUB_TOKEN=my_token npm run release -- 1.x.x`
* Create a dedicated branch: `git checkout -b release/1.x.x && git push origin release/1.x.x`
* Check the release is okay: https://github.com/Chocobozzz/PeerTube/releases
......
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