[MM-39852] Setup docker image to run in CI for E2E (#1946)
* [MM-39852] Setup docker image to run in CI for E2E * Setup remote docker * Install docker * Trying this * And this * how about this * this * Okay this * dis one * sdfsagsdags * Now? * aaaaaaa * asdasdasd * i am dumb * blank * Please work * Lint fix * Forgot to update a couple things * OOPS * Testing something since this one is still failing * Trying robotjs instead * test * Remove stop docker * Try without the admin user (since apparently turning off admin notices didn't work) * Remove console statement Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
This commit is contained in:
@@ -27,55 +27,59 @@ const electronBinaryPath = (() => {
|
||||
const userDataDir = path.join(sourceRootDir, 'e2e/testUserData/');
|
||||
const configFilePath = path.join(userDataDir, 'config.json');
|
||||
const boundsInfoPath = path.join(userDataDir, 'bounds-info.json');
|
||||
const mattermostURL = 'http://example.com/';
|
||||
const exampleURL = 'http://example.com/';
|
||||
const mattermostURL = 'http://localhost:8065/';
|
||||
|
||||
const exampleTeam = {
|
||||
name: 'example',
|
||||
url: exampleURL,
|
||||
order: 0,
|
||||
tabs: [
|
||||
{
|
||||
name: 'TAB_MESSAGING',
|
||||
order: 0,
|
||||
isOpen: true,
|
||||
},
|
||||
{
|
||||
name: 'TAB_FOCALBOARD',
|
||||
order: 1,
|
||||
isOpen: true,
|
||||
},
|
||||
{
|
||||
name: 'TAB_PLAYBOOKS',
|
||||
order: 2,
|
||||
isOpen: true,
|
||||
},
|
||||
],
|
||||
lastActiveTab: 0,
|
||||
};
|
||||
const githubTeam = {
|
||||
name: 'github',
|
||||
url: 'https://github.com/',
|
||||
order: 1,
|
||||
tabs: [
|
||||
{
|
||||
name: 'TAB_MESSAGING',
|
||||
order: 0,
|
||||
isOpen: true,
|
||||
},
|
||||
{
|
||||
name: 'TAB_FOCALBOARD',
|
||||
order: 1,
|
||||
isOpen: true,
|
||||
},
|
||||
{
|
||||
name: 'TAB_PLAYBOOKS',
|
||||
order: 2,
|
||||
isOpen: true,
|
||||
},
|
||||
],
|
||||
lastActiveTab: 0,
|
||||
};
|
||||
|
||||
const demoConfig = {
|
||||
version: 3,
|
||||
teams: [{
|
||||
name: 'example',
|
||||
url: mattermostURL,
|
||||
order: 0,
|
||||
tabs: [
|
||||
{
|
||||
name: 'TAB_MESSAGING',
|
||||
order: 0,
|
||||
isOpen: true,
|
||||
},
|
||||
{
|
||||
name: 'TAB_FOCALBOARD',
|
||||
order: 1,
|
||||
isOpen: true,
|
||||
},
|
||||
{
|
||||
name: 'TAB_PLAYBOOKS',
|
||||
order: 2,
|
||||
isOpen: true,
|
||||
},
|
||||
],
|
||||
lastActiveTab: 0,
|
||||
}, {
|
||||
name: 'github',
|
||||
url: 'https://github.com/',
|
||||
order: 1,
|
||||
tabs: [
|
||||
{
|
||||
name: 'TAB_MESSAGING',
|
||||
order: 0,
|
||||
isOpen: true,
|
||||
},
|
||||
{
|
||||
name: 'TAB_FOCALBOARD',
|
||||
order: 1,
|
||||
isOpen: true,
|
||||
},
|
||||
{
|
||||
name: 'TAB_PLAYBOOKS',
|
||||
order: 2,
|
||||
isOpen: true,
|
||||
},
|
||||
],
|
||||
lastActiveTab: 0,
|
||||
}],
|
||||
teams: [exampleTeam, githubTeam],
|
||||
showTrayIcon: false,
|
||||
trayIconTheme: 'light',
|
||||
minimizeToTray: false,
|
||||
@@ -93,13 +97,23 @@ const demoConfig = {
|
||||
spellCheckerLocales: [],
|
||||
};
|
||||
|
||||
const demoMattermostConfig = {
|
||||
...demoConfig,
|
||||
teams: [{
|
||||
...exampleTeam,
|
||||
url: mattermostURL,
|
||||
}, githubTeam],
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
sourceRootDir,
|
||||
configFilePath,
|
||||
userDataDir,
|
||||
boundsInfoPath,
|
||||
exampleURL,
|
||||
mattermostURL,
|
||||
demoConfig,
|
||||
demoMattermostConfig,
|
||||
|
||||
cleanTestConfig() {
|
||||
[configFilePath, boundsInfoPath].forEach((file) => {
|
||||
@@ -171,6 +185,15 @@ module.exports = {
|
||||
return map;
|
||||
},
|
||||
|
||||
async loginToMattermost(window) {
|
||||
await window.waitForSelector('#loginId');
|
||||
await window.waitForSelector('#loginPassword');
|
||||
await window.waitForSelector('#loginButton');
|
||||
await window.type('#loginId', 'user-1');
|
||||
await window.type('#loginPassword', 'SampleUs@r-1');
|
||||
await window.click('#loginButton');
|
||||
},
|
||||
|
||||
addClientCommands(client) {
|
||||
client.addCommand('loadSettingsPage', function async() {
|
||||
ipcRenderer.send(SHOW_SETTINGS_WINDOW);
|
||||
|
Reference in New Issue
Block a user