Skip to content

Commit cee3cea

Browse files
committed
+4 tests
1 parent 2b7c50d commit cee3cea

4 files changed

Lines changed: 120 additions & 0 deletions

File tree

tests/create-platform-0-0.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { Selector } from 'testcafe';
2+
3+
fixture('create-platform-0-0').page(process.env.TL_URL);
4+
5+
const fake = require('faker');
6+
let name = fake.commerce.productName();
7+
let enable_on_design = 0;
8+
let enable_on_execution = 0;
9+
10+
test('create-platform-0-0', async t => {
11+
await t
12+
.typeText(Selector('#tl_login'), 'admin')
13+
.typeText(Selector('#tl_password'), 'admin')
14+
.pressKey('enter')
15+
.switchToIframe(Selector('[name="mainframe"].siteContent'))
16+
.click(Selector('a').withText('Platform Management'))
17+
.click(Selector('a').withText('Create'))
18+
.typeText(Selector('#name'), name);
19+
20+
if (enable_on_design) {
21+
await t
22+
.click(Selector('#enable_on_design'));
23+
}
24+
if (enable_on_execution) {
25+
await t
26+
.click(Selector('#enable_on_execution'));
27+
}
28+
29+
await t.click(Selector('#submitButton'));
30+
});

tests/create-platform-0-1.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { Selector } from 'testcafe';
2+
3+
fixture('create-platform-0-1').page(process.env.TL_URL);
4+
5+
const fake = require('faker');
6+
let name = fake.commerce.productName();
7+
let enable_on_design = 0;
8+
let enable_on_execution = 1;
9+
10+
test('create-platform-0-1', async t => {
11+
await t
12+
.typeText(Selector('#tl_login'), 'admin')
13+
.typeText(Selector('#tl_password'), 'admin')
14+
.pressKey('enter')
15+
.switchToIframe(Selector('[name="mainframe"].siteContent'))
16+
.click(Selector('a').withText('Platform Management'))
17+
.click(Selector('a').withText('Create'))
18+
.typeText(Selector('#name'), name);
19+
20+
if (enable_on_design) {
21+
await t
22+
.click(Selector('#enable_on_design'));
23+
}
24+
if (enable_on_execution) {
25+
await t
26+
.click(Selector('#enable_on_execution'));
27+
}
28+
29+
await t.click(Selector('#submitButton'));
30+
});

tests/create-platform-1-0.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { Selector } from 'testcafe';
2+
3+
fixture('create-platform-1-0').page(process.env.TL_URL);
4+
5+
const fake = require('faker');
6+
let name = fake.commerce.productName();
7+
let enable_on_design = 1;
8+
let enable_on_execution = 0;
9+
10+
test('create-platform-1-0', async t => {
11+
await t
12+
.typeText(Selector('#tl_login'), 'admin')
13+
.typeText(Selector('#tl_password'), 'admin')
14+
.pressKey('enter')
15+
.switchToIframe(Selector('[name="mainframe"].siteContent'))
16+
.click(Selector('a').withText('Platform Management'))
17+
.click(Selector('a').withText('Create'))
18+
.typeText(Selector('#name'), name);
19+
20+
if (enable_on_design) {
21+
await t
22+
.click(Selector('#enable_on_design'));
23+
}
24+
if (enable_on_execution) {
25+
await t
26+
.click(Selector('#enable_on_execution'));
27+
}
28+
29+
await t.click(Selector('#submitButton'));
30+
});

tests/create-platform-1-1.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { Selector } from 'testcafe';
2+
3+
fixture('create-platform-1-1').page(process.env.TL_URL);
4+
5+
const fake = require('faker');
6+
let name = fake.commerce.productName();
7+
let enable_on_design = 1;
8+
let enable_on_execution = 1;
9+
10+
test('create-platform-1-1', async t => {
11+
await t
12+
.typeText(Selector('#tl_login'), 'admin')
13+
.typeText(Selector('#tl_password'), 'admin')
14+
.pressKey('enter')
15+
.switchToIframe(Selector('[name="mainframe"].siteContent'))
16+
.click(Selector('a').withText('Platform Management'))
17+
.click(Selector('a').withText('Create'))
18+
.typeText(Selector('#name'), name);
19+
20+
if (enable_on_design) {
21+
await t
22+
.click(Selector('#enable_on_design'));
23+
}
24+
if (enable_on_execution) {
25+
await t
26+
.click(Selector('#enable_on_execution'));
27+
}
28+
29+
await t.click(Selector('#submitButton'));
30+
});

0 commit comments

Comments
 (0)