Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ pipeline {
}
when { anyOf { branch 'master' } }
steps {
withCredentials([usernamePassword(credentialsId: 'gmail-qa-user', usernameVariable: 'GOOGLE_EMAIL', passwordVariable: 'GOOGLE_PASSWORD')]) {
withCredentials([
usernamePassword(credentialsId: 'gmail-qa-user', usernameVariable: 'GOOGLE_EMAIL', passwordVariable: 'GOOGLE_PASSWORD'),
usernamePassword(credentialsId: 'pp-uat-user', usernameVariable: 'USER_NAME_PP', passwordVariable: 'USER_PASS_PP')
]){
sh 'npm run test-ci'
}
}
Expand Down
17 changes: 2 additions & 15 deletions tests/e2e/platform_portal_integration/environment/environment.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
export const BASE_URL =
process.env.BASE_URL || "https://partners.platform-os.com";
export const ADMIN_PASS = process.env.ADMIN_PASS_GUI || "pass123sanity";
export const USERDATA = process.env.DATA_GUI || {
NAME: "test_user",
LASTNAME: "qa",
USER_EMAIL: `test+${+new Date()}@example.com`,
PASSWORD: "password"
};
export const PARTNERDATA = process.env.DATA_GUI || {
NAME: `partner+${+new Date()}`
};
export const MODULEDATA = process.env.DATA_GUI || {
MODULENAME: `module+${+new Date()}`
};

export const EMAIL_USER_PROD = "jacek+ppe2e@near-me.com";
export const USER_NAME = process.env.USER_NAME_PP
export const USER_PASS = process.env.USER_PASS_PP
33 changes: 17 additions & 16 deletions tests/e2e/platform_portal_integration/smokeTests.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import 'testcafe';
import {
BASE_URL,
EMAIL_USER_PROD,
ADMIN_PASS,
} from './environment/environment';
import LoginPage from './page-objects/loginPage';
import Notifications from './page-objects/notifications';
import Navigation from './page-objects/navigation';
import InstancePage from './page-objects/instancePage';
import BasePage from './page-objects/basePage';
import ModulePage from './page-objects/modulePage';
USER_NAME,
USER_PASS,
} from '../environment/environment';
import LoginPage from '../page-objects/loginPage';
import Notifications from '../page-objects/notifications';
import Navigation from '../page-objects/navigation';
import InstancePage from '../page-objects/instancePage';
import BasePage from '../page-objects/basePage';
import ModulePage from '../page-objects/modulePage';

const loginPage = new LoginPage();
const notifications = new Notifications();
Expand All @@ -18,13 +18,14 @@ const instancePage = new InstancePage();
const basePage = new BasePage();
const modulePage = new ModulePage();

const admin_pass = ADMIN_PASS;
const user_name = USER_NAME;
const user_pass = USER_PASS;
const instanceName = `test+${+new Date ()}`;

fixture `pOS - PP - POS-CLI integration tests`.page(BASE_URL);

test('Should let you create instance', async t => {
await loginPage.login(EMAIL_USER_PROD, admin_pass);
await loginPage.login(user_name, user_pass);
await t
.click(navigation.link.instances)
.click(instancePage.button.newInstance);
Expand All @@ -42,7 +43,7 @@ test('Should let you create instance', async t => {
});

test('Should install blog module', async t => {
await loginPage.login(EMAIL_USER_PROD, admin_pass);
await loginPage.login(user_name, user_pass);
await basePage.openPage(modulePage.installUAT_blogModule);
await t
.click(modulePage.button.addModuleToInstance)
Expand All @@ -57,7 +58,7 @@ test('Should install blog module', async t => {
});

test('Blog module should be installed on the page', async t => {
await loginPage.login(EMAIL_USER_PROD, admin_pass);
await loginPage.login(user_name, user_pass);
await t
.wait(30000) //waiting for module deploy
.click(navigation.link.instances)
Expand All @@ -68,7 +69,7 @@ test('Blog module should be installed on the page', async t => {
});

test('Should let you remove instance', async t => {
await loginPage.login(EMAIL_USER_PROD, admin_pass);
await loginPage.login(user_name, user_pass);
await t
.click(instancePage.link.instanceName)
.click(instancePage.link.dangerZone)
Expand All @@ -78,9 +79,9 @@ test('Should let you remove instance', async t => {
});

test('Instance should be removed', async t => {
await loginPage.login(EMAIL_USER_PROD, admin_pass);
await loginPage.login(user_name, user_pass);
await t
.click(navigation.link.instances)
.expect(instancePage.link.instanceName.count)
.eql(0);
});
});