Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
8c0a689
header and very basic json schema
angerooney11 Feb 12, 2018
f42fcad
Merge branch 'master' of https://github.com/xtracdev/automated-perf-t…
ColmCooney Feb 12, 2018
ed56488
added basic table
angerooney11 Feb 13, 2018
2b11f31
Merge branch 'feature/XAPTC-38' of https://github.com/xtracdev/automa…
angerooney11 Feb 13, 2018
1f74b77
post service working in test suite
angerooney11 Feb 14, 2018
d1e5e5b
Merge branch 'feature/XAPTC-39' of https://github.com/xtracdev/automa…
angerooney11 Feb 14, 2018
84059ed
Upadated buttons and inputs
ColmCooney Feb 14, 2018
291bfe8
Upadated create and updated buttons
ColmCooney Feb 14, 2018
2a6bef1
started get and put services
angerooney11 Feb 15, 2018
1bd0269
no message
angerooney11 Feb 15, 2018
d8c709b
get all service and post service working for ui side
angerooney11 Feb 15, 2018
43a1510
removed submit button from test suite schema
angerooney11 Feb 15, 2018
31001ec
-Page now using schema to generate UI
ColmCooney Feb 16, 2018
020d3dc
merge
ColmCooney Feb 16, 2018
b6b800a
Merge conflicts
ColmCooney Feb 16, 2018
0709af4
Deleting onSubmit
ColmCooney Feb 16, 2018
2d4efec
Merge conflicts
ColmCooney Feb 16, 2018
9d74ecc
Update protractor tests
ColmCooney Feb 19, 2018
6f34ef8
Merge branch 'feature/XAPTC-43' of https://github.com/xtracdev/automa…
ColmCooney Feb 19, 2018
7616d5c
Get All Test Cases
ColmCooney Feb 20, 2018
30f4ddf
select all and delete all test cases working
angerooney11 Feb 20, 2018
5abb19f
Merge branch 'feature/XAPTC-44' of https://github.com/xtracdev/automa…
angerooney11 Feb 20, 2018
4a11a6c
Adding from available table to selected
ColmCooney Feb 20, 2018
f694823
Mege conflicts of testSuites Html and component
ColmCooney Feb 20, 2018
82fd4ac
basic function to update file name, no conditions yet
frankquinn Feb 21, 2018
442f081
changed error from last commit
frankquinn Feb 21, 2018
95f3962
added buttons
angerooney11 Feb 26, 2018
b494d21
refactor
ColmCooney Feb 26, 2018
828ba5b
-refactored error
frankquinn Feb 27, 2018
c26f592
Merge branch 'master' of https://github.com/xtracdev/automated-perf-t…
frankquinn Feb 27, 2018
1480c28
Merge branch 'master' of https://github.com/xtracdev/automated-perf-t…
CameliaFarcas Feb 27, 2018
a1525cd
Merge branch 'testPostSuite' of https://github.com/xtracdev/automated…
ColmCooney Feb 27, 2018
69ea9e4
test branch
ConorSmyth Feb 28, 2018
f74a40a
get all method from ui
angerooney11 Feb 28, 2018
20a3080
full schema
angerooney11 Feb 28, 2018
c952cd5
merged get all
angerooney11 Feb 28, 2018
bd723d4
Adding get Functioality
ColmCooney Feb 28, 2018
d9df638
fixed typo error
angerooney11 Feb 28, 2018
6dc14f1
post method on UI
angerooney11 Feb 28, 2018
6c3e73b
all get all golang
angerooney11 Feb 28, 2018
722b44b
get all working
angerooney11 Feb 28, 2018
19e3712
basic post method working
angerooney11 Mar 1, 2018
f8f37d0
select and deselect of testcase on click
ColmCooney Mar 1, 2018
4fe0e12
Refactor
ColmCooney Mar 2, 2018
1faec0e
updated layout on config schema
angerooney11 Mar 4, 2018
63c014f
added package for layout
angerooney11 Mar 4, 2018
a73a783
Put functionality- Not fully complete
ColmCooney Mar 5, 2018
1630bda
get one method on ui side
angerooney11 Mar 5, 2018
fc25aa4
Merge branch 'master' of https://github.com/xtracdev/automated-perf-t…
angerooney11 Mar 5, 2018
55cc123
get one working from ui, just need to edit from go lang side
angerooney11 Mar 5, 2018
4defedc
XAPTC-63 delete all test cases
CameliaFarcas Mar 5, 2018
b3e2318
Merge branch 'master' of https://github.com/xtracdev/automated-perf-t…
ConorSmyth Mar 5, 2018
6cefca5
Merge branch 'master' of https://github.com/xtracdev/automated-perf-t…
ConorSmyth Mar 5, 2018
eeaa7e9
XAPTC-63 delete all test cases (one file added)
CameliaFarcas Mar 5, 2018
5a1b7db
put method working
angerooney11 Mar 6, 2018
dcf8826
cancel button working, schema form not working correctly
angerooney11 Mar 6, 2018
4567cce
refactor
angerooney11 Mar 6, 2018
3280fba
Updated Put functionality
ColmCooney Mar 6, 2018
89ad72b
edit typos, form in schema still not working with arrays
angerooney11 Mar 6, 2018
6573cf2
Merge branch 'feature/XAPTC-10.1' of https://github.com/xtracdev/auto…
angerooney11 Mar 6, 2018
2b63d13
Updates on feedback
ColmCooney Mar 7, 2018
deee89a
Merge branch 'feature/XAPTC-63' of https://github.com/xtracdev/automa…
ConorSmyth Mar 7, 2018
8fc0746
XAPTC-63 DELETE All Test Cases
CameliaFarcas Mar 7, 2018
21ca861
Added test files and changed git ignore
CameliaFarcas Mar 7, 2018
e474e32
Merge branch 'feature/XAPTC-63' of https://github.com/xtracdev/automa…
CameliaFarcas Mar 7, 2018
1c9762e
XAPTC-63 Delete all test cases and features (last test passed)
CameliaFarcas Mar 7, 2018
58cc2fa
Add testSuites to dropdown- Work In progress
ColmCooney Mar 7, 2018
34899f4
Change Name column/Title
angerooney11 Mar 7, 2018
ad16cec
Merge branch 'master' of https://github.com/xtracdev/automated-perf-t…
ConorSmyth Mar 7, 2018
ca64f04
refactor
ColmCooney Mar 7, 2018
4835ec8
add
CameliaFarcas Mar 7, 2018
0044ec3
XAPTC-63 commented out tests in: homepage_test.go to be given feedbac…
CameliaFarcas Mar 7, 2018
20666c1
XAPTC-63 code tidy-up
CameliaFarcas Mar 8, 2018
4f95a02
take out form from schema
angerooney11 Mar 8, 2018
e32087b
refactor on "onLoad" method so that it updates file based on "File Na…
angerooney11 Mar 8, 2018
b908807
Merge branch 'master' of https://github.com/xtracdev/automated-perf-t…
ColmCooney Mar 8, 2018
3b3645c
merge conflicts
ColmCooney Mar 8, 2018
9fda3c7
Merge branch 'master' of https://github.com/xtracdev/automated-perf-t…
frankquinn Mar 8, 2018
b0d938a
delete package.json, edit services
angerooney11 Mar 8, 2018
7e51977
Merge branch 'feature/XAPTC-10.1' of https://github.com/xtracdev/auto…
angerooney11 Mar 8, 2018
c32cac6
changes based on feedback
ColmCooney Mar 8, 2018
7d86cb4
taken out console.log lines
angerooney11 Mar 8, 2018
0532093
Merge branch 'feature/XAPTC-10.1' of https://github.com/xtracdev/auto…
ConorSmyth Mar 9, 2018
4ee17c5
fixing linting changes
ConorSmyth Mar 9, 2018
ca40686
tidy up extra files
ConorSmyth Mar 9, 2018
3f7944b
remove debug log
ConorSmyth Mar 9, 2018
bd985e1
remove material design reference
ConorSmyth Mar 9, 2018
8399447
Change to use enviroments file
ConorSmyth Mar 9, 2018
d98bb84
tidy up unit tests
ConorSmyth Mar 9, 2018
00f1a4b
Merge branch 'master' of https://github.com/xtracdev/automated-perf-t…
ConorSmyth Mar 12, 2018
c70db7c
Merge branch 'master' of https://github.com/xtracdev/automated-perf-t…
ConorSmyth Mar 12, 2018
52a7f52
Merge branch 'feature/XAPTC-63' of https://github.com/xtracdev/automa…
ConorSmyth Mar 12, 2018
a34fadc
fix unit tests
ConorSmyth Mar 12, 2018
64e9504
fixing integration tests
ConorSmyth Mar 12, 2018
b844cab
fixing integration tests
ConorSmyth Mar 12, 2018
a153b8d
XAPTC-63 modified function deleteAllTestCases
CameliaFarcas Mar 12, 2018
d797838
XAPTC-63 integration tests fixed
CameliaFarcas Mar 12, 2018
28272e3
homepage_test.go file deleted
CameliaFarcas Mar 12, 2018
e8825d7
loop fixed, in testCaseService
CameliaFarcas Mar 12, 2018
1352adc
refactor of headers
jenny-flynn Mar 12, 2018
629a102
adding more files to exclude from git
ConorSmyth Mar 12, 2018
8892cf3
XAPTC-63 changes based on feedback
CameliaFarcas Mar 13, 2018
6520e58
XUI-APTC fixing unit tests
ConorSmyth Mar 14, 2018
d80ddf7
Merge branch 'feature/XAPTC-63' of https://github.com/xtracdev/automa…
ConorSmyth Mar 14, 2018
8ee284d
Remove duplication of XML writer
ConorSmyth Mar 21, 2018
53b56bf
header path was not being retrieved
ColmCooney Mar 21, 2018
8e1c191
remove test config files
jenny-flynn Mar 21, 2018
b789e7d
reducing duplication
ConorSmyth Mar 21, 2018
7c48afb
Merge branch 'develop' of https://github.com/xtracdev/automated-perf-…
ConorSmyth Mar 21, 2018
95a1044
XAPTC-51 configFile.feature modified as to pass godog tests
CameliaFarcas Mar 23, 2018
a74f8cd
XAPTC-51 html code fixed & Url changes; card still in progress!
CameliaFarcas Mar 26, 2018
f2e06cc
XAPTC-51 test case e2e selector added
CameliaFarcas Mar 27, 2018
0be2910
XAPTC-51 e2e test function to add test cases added
CameliaFarcas Mar 28, 2018
f7ed628
XAPTC-51 e2e test cases in progress!
CameliaFarcas Mar 29, 2018
97d6a12
XAPTC-51 valid e2e tests for Test Cases Page
CameliaFarcas Mar 30, 2018
1ab88a2
XAPTC-51 e2e tests for test cases finalized
CameliaFarcas Apr 3, 2018
7c619cc
XAPTC-51 valid e2e tests added for Test Cases Page
CameliaFarcas Apr 3, 2018
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
17 changes: 15 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@

config/*.xml
!config/config.xml
*.iml
.idea
ui/
automated-perf-test
uiServices/test/*.xml
*.bak
main
.idea
ui/
**/node_modules
/.editorconfig
/.editorconfig

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate of lines 1-7?

config/*.xml
!config/config.xml
*.iml
.idea
ui/
automated-perf-test
uiServices/test/*.xml
10 changes: 0 additions & 10 deletions automated-perf-test.iml

This file was deleted.

11 changes: 6 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ import (
"encoding/xml"
"flag"
"fmt"
log "github.com/Sirupsen/logrus"
"github.com/xtracdev/automated-perf-test/perfTestUtils"
"github.com/xtracdev/automated-perf-test/testStrategies"
"github.com/xtracdev/automated-perf-test/uiServices/src"
"io/ioutil"
"net/http"
"os"
"time"

log "github.com/Sirupsen/logrus"
"github.com/xtracdev/automated-perf-test/perfTestUtils"
"github.com/xtracdev/automated-perf-test/testStrategies"
"github.com/xtracdev/automated-perf-test/uiServices/src"
)

//----- Globals ------------------------------------------------------------------
Expand Down Expand Up @@ -147,7 +148,7 @@ func initConfig(args []string, fs perfTestUtils.FileSystem, exit func(code int))

// Start server for the User Interface Mode
if uiMode {
services.StartUiMode()
services.StartUIMode()
}

setLogLevel(boolVerbose, boolDebug)
Expand Down
3 changes: 0 additions & 3 deletions package-lock.json

This file was deleted.

41 changes: 21 additions & 20 deletions testStrategies/commonToAllTestStrategies.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,23 @@ type ResponseValue struct {

// TestDefinition encapsulates the XML data.
type TestDefinition struct {
XMLName xml.Name `xml:"testDefinition" json:"testDefinition"`
TestName string `xml:"testName" json:"testName"`
OverrideHost string `xml:"overrideHost" json:"overrideHost"`
OverridePort string `xml:"overridePort" json:"overridePort"`
HTTPMethod string `xml:"httpMethod" json:"httpMethod"`
Description string `xml:"description" json:"description"`
BaseURI string `xml:"baseUri" json:"baseUri"`
Multipart bool `xml:"multipart" json:"multipart"`
Payload string `xml:"payload" json:"payload"`
MultipartPayload []multipartFormField `xml:"multipartPayload>multipartFormField" json:"multipartPayload"`
ResponseStatusCode int `xml:"responseStatusCode" json:"responseStatusCode"`
ResponseContentType string `xml:"responseContentType" json:"responseContentType"`
Headers []Header `xml:"headers>header" json:"headers"`
ResponseValues []ResponseValue `xml:"responseProperties>value" json:"responseValues"`
PreThinkTime int64
PostThinkTime int64
ExecWeight string
XMLName xml.Name `xml:"testDefinition"`
TestName string `xml:"testName"`
OverrideHost string `xml:"overrideHost"`
OverridePort string `xml:"overridePort"`
HTTPMethod string `xml:"httpMethod"`
Description string `xml:"description"`
BaseURI string `xml:"baseUri"`
Multipart bool `xml:"multipart"`
Payload string `xml:"payload"`
MultipartPayload []multipartFormField `xml:"multipartPayload>multipartFormField"`
ResponseStatusCode int `xml:"responseStatusCode"`
ResponseContentType string `xml:"responseContentType"`
Headers []Header `xml:"headers>header"`
ResponseValues []ResponseValue `xml:"responseProperties>value"`
PreThinkTime int64 `xml:"preThinkTime"`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't include this change (prethinktime, postthinktime, execweight).

@ConorSmyth Should this be merging to develop?

PostThinkTime int64 `xml:"postThinkTime"`
ExecWeight string `xml:"execWeight"`
}

// TestSuite fields get populated from the TestSuiteDefinition after the XML
Expand All @@ -75,17 +75,18 @@ type TestSuite struct {
XMLName xml.Name `xml:"testSuite"`
Name string `xml:"name" json:"name"`
Description string `xml:"description" json:"description"`
TestStrategy string `xml:"testStrategy" json:"testStrategy"`
TestCases []TestCase `xml:"testCases>testCase" json:"testCases"`
TestStrategy string `xml:"testStrategy"`
TestCases []TestCase `xml:"testCases>testCase"`
TestDefinitions []*TestDefinition
}

// TestCase is used to encapsulate and marshal a <testCase> tag from the
// <testSuite> XML file. This data will then be consolidated into
// the TestSuite/TestDefinition data structure for usage.
type TestCase struct {
XMLName xml.Name `xml:"testCase" json:"testCase"`
XMLName xml.Name `xml:"testCase"`
Name string `xml:",chardata"`
Description string `xml:"description,attr" json:"description"`
PreThinkTime int64 `xml:"preThinkTime,attr" json:"preThinkTime"`
PostThinkTime int64 `xml:"postThinkTime,attr" json:"postThinkTime"`
ExecWeight string `xml:"execWeight,attr" json:"execWeight"`
Expand Down
74 changes: 35 additions & 39 deletions ui-src/e2e/components/configurationComponent.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

import {
browser,
element,
Expand All @@ -20,7 +21,7 @@ const configPO: ConfigurationPageObject = new ConfigurationPageObject();

describe("configuration component", () => {
beforeEach(() => {
browser.get("http://localhost:9191");
browser.get("/");
browser.executeScript("window.onbeforeunload = function(e){};");
browser.driver
.manage()
Expand All @@ -29,18 +30,13 @@ describe("configuration component", () => {
});

it("should create xml file", () => {
configPO.setConfigData();
configPO.submitBtn.click();
expect(configPO.toastrMessage.getText()).toContain(
"Your data has been saved!"
);
configPO.setConfigData(); //Act
configPO.submitBtn.click(); //Action
expect(configPO.toastrMessage.getText()).toEqual(
"Success!\nYour data has been saved!"
); //Assert
});

it("should show submit button is disabled when requiredFields data is blank", () => {
// used to clear default data in this test
configPO.checkRequiredFields();
expect(configPO.submitBtn.isEnabled()).toBe(false);
});

it("should check that all text box names are correct", () => {
configPO.setConfigData();
Expand All @@ -63,30 +59,31 @@ describe("configuration component", () => {
);
});

it("should check values of existing file are as expected", () => {
configPO.configFilePath.sendKeys(configPO.absolutePath);
configPO.xmlFileName.sendKeys("config.xml");
configPO.cancelBtn.click();
expect(configPO.applicationName.getAttribute("value")).toEqual("config");
expect(configPO.targetHost.getAttribute("value")).toEqual("localhost");
expect(configPO.targetPort.getAttribute("value")).toEqual("8080");
expect(configPO.testCaseDir.getAttribute("value")).toEqual(
"./definitions/testCases"
);
expect(configPO.baseStatsDir.getAttribute("value")).toEqual("./envStats");
expect(configPO.memoryEndpoint.getAttribute("value")).toEqual(
"/alt/debug/vars"
);
expect(configPO.reportsDir.getAttribute("value")).toEqual("./report");
expect(configPO.numIterations.getAttribute("value")).toEqual("1000");
expect(configPO.memoryVariance.getAttribute("value")).toEqual("15");
expect(configPO.serviceVariance.getAttribute("value")).toEqual("15");
expect(configPO.concurrentUsers.getAttribute("value")).toEqual("50");
expect(configPO.requestDelay.getAttribute("value")).toEqual("5000");
expect(configPO.tpsFreq.getAttribute("value")).toEqual("30");
expect(configPO.rampDelay.getAttribute("value")).toEqual("15");
expect(configPO.rampUsers.getAttribute("value")).toEqual("5");
});
// it("should check values of existing file are as expected", () => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commented out tests?

// configPO.configFilePath.sendKeys(configPO.absolutePath);
// configPO.xmlFileName.sendKeys("config");
// configPO.cancelBtn.click();
// expect(configPO.applicationName.getAttribute("value")).toEqual("config");
// expect(configPO.targetHost.getAttribute("value")).toEqual("localhost");
// expect(configPO.targetPort.getAttribute("value")).toEqual("8080");
// expect(configPO.testCaseDir.getAttribute("value")).toEqual(
// "./definitions/testCases"
// );
// expect(configPO.baseStatsDir.getAttribute("value")).toEqual("./envStats");
// expect(configPO.memoryEndpoint.getAttribute("value")).toEqual(
// "/alt/debug/vars"
// );
// expect(configPO.reportsDir.getAttribute("value")).toEqual("./report");
// expect(configPO.numIterations.getAttribute("value")).toEqual("1000");
// expect(configPO.memoryVariance.getAttribute("value")).toEqual("15");
// expect(configPO.serviceVariance.getAttribute("value")).toEqual("15");
// expect(configPO.concurrentUsers.getAttribute("value")).toEqual("50");
// expect(configPO.requestDelay.getAttribute("value")).toEqual("5000");
// expect(configPO.tpsFreq.getAttribute("value")).toEqual("30");
// expect(configPO.rampDelay.getAttribute("value")).toEqual("15");
// expect(configPO.rampUsers.getAttribute("value")).toEqual("15");
// });


it("should throw error when file path does not exist", () => {
configPO.setConfigData();
Expand Down Expand Up @@ -228,18 +225,17 @@ describe("configuration component", () => {

it("should update existing file", () => {
configPO.configFilePath.sendKeys(configPO.absolutePath);
configPO.xmlFileName.sendKeys("config.xml");
configPO.xmlFileName.sendKeys("config");
configPO.cancelBtn.click();
configPO.numIterations.sendKeys(5);
configPO.btnUpdate.click();
configPO.numIterations.sendKeys(Key.BACK_SPACE);
configPO.cancelBtn.click();

configPO.getConfigFileBtn.click();

expect(configPO.numIterations.getAttribute("value")).toEqual("10005");
});

it("should show update button is disabled when Xml File Name is blank", () => {
expect(configPO.btnUpdate.isEnabled()).toBe(false);
expect(configPO.btnUpdate.isPresent()).toBe(false);
});
});
118 changes: 118 additions & 0 deletions ui-src/e2e/components/testCasesComponent.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
import {
browser,
element,
by,
By,
$,
$$,
ExpectedConditions,
protractor,
WebDriver,
Key
} from "protractor";
import { read } from "fs";
import { Input } from "@angular/core/src/metadata/directives";
import { ToastModule } from "ng2-toastr/ng2-toastr";
const since = require("jasmine2-custom-message");

import TestCasePageObject = require("../pages/testCases-PO");
const testCasePO: TestCasePageObject = new TestCasePageObject();


describe("test cases component", () => {
beforeEach(() => {
browser.get("/");
browser.executeScript("window.onbeforeunload = function(e){};");
browser.driver
.manage()
.window()
.maximize();
});


fit('should create a new test case file', () => {
testCasePO.setTestCasesPage();
testCasePO.setTestCaseData();
testCasePO.btnSave.click();
expect(testCasePO.toastrMessage.getText()).toEqual(
"Success!\nYour data has been saved!"
);
});

fit("should check that all text box names are correct", () => {
testCasePO.setTestCasesPage();
testCasePO.setTestCaseData();
expect(testCasePO.labels.get(0).getText()).toContain("Testname");
expect(testCasePO.labels.get(1).getText()).toContain("Description");
expect(testCasePO.labels.get(2).getText()).toContain("Base URI");
expect(testCasePO.labels.get(3).getText()).toContain("Override Host");
expect(testCasePO.labels.get(4).getText()).toContain("Multipart");
expect(testCasePO.labels.get(5).getText()).toContain("Override Port");
expect(testCasePO.labels.get(6).getText()).toContain("Payload");
expect(testCasePO.labels.get(7).getText()).toContain("Http Method");
expect(testCasePO.labels.get(8).getText()).toContain("Headers");
expect(testCasePO.labels.get(11).getText()).toContain("Pre Think Time");
expect(testCasePO.labels.get(12).getText()).toContain("Post Think Time");
expect(testCasePO.labels.get(13).getText()).toContain("Exec Weight");
expect(testCasePO.labels.get(14).getText()).toContain("Response Status Code");
expect(testCasePO.labels.get(15).getText()).toContain("Response Content Type");
expect(testCasePO.labels.get(16).getText()).toContain("Multipart Payload");


});


fit("should throw error when a test case file path does not exist", () => {
testCasePO.setTestCasesPage();
testCasePO.setTestCaseData();
testCasePO.testCaseDir.sendKeys("/path/to/bad/location");
testCasePO.btnSave.click();
expect(testCasePO.toastrMessage.getText()).toContain(
"Some of the fields do not conform to the schema"
);
});

fit("should check requiredFields warning appears when requiredFields input is blank", () => {
testCasePO.setTestCasesPage();
testCasePO.checkRequiredFields();
expect(testCasePO.requiredFields.get(0).getText()).toContain("This field is required.");
expect(testCasePO.requiredFields.get(1).getText()).toContain("This field is required.");
expect(testCasePO.requiredFields.get(2).getText()).toContain("This field is required.");
expect(testCasePO.requiredFields.get(3).getText()).toContain("This field is required.");
expect(testCasePO.requiredFields.get(4).getText()).toContain("This field is required.");
expect(testCasePO.requiredFields.get(5).getText()).toContain("This field is required.");
expect(testCasePO.requiredFields.get(6).getText()).toContain("This field is required.");
expect(testCasePO.requiredFields.get(7).getText()).toContain("This field is required.");
expect(testCasePO.requiredFields.get(8).getText()).toContain("This field is required.");

});

fit("should show that string cannot be entered into a integer field", () => {
testCasePO.setTestCasesPage();
testCasePO.checkForStrings();
expect(testCasePO.postThinkTime.getAttribute("value")).toEqual("");
expect(testCasePO.preThinkTime.getAttribute("value")).toEqual("");
expect(testCasePO.responseStatusCode.getAttribute("value")).toEqual("");
});


fit("should check that e is not accepted in integer field", () =>{
testCasePO.setTestCasesPage();
testCasePO.checkEisNotAccepted();
expect(testCasePO.requiredFields.get(0).getText()).toContain("This field is required.");
expect(testCasePO.requiredFields.get(1).getText()).toContain("This field is required.");
expect(testCasePO.requiredFields.get(2).getText()).toContain("This field is required.");
});

fit("should check that warning appears if negative number is enter to integer field", () => {
testCasePO.setTestCasesPage();
testCasePO.checkNegativeValues();
//browser.sleep(10000);
expect(testCasePO.requiredFields.get(0).getText()).toContain("Must be 1 or more");
expect(testCasePO.requiredFields.get(1).getText()).toContain("Must be 1 or more");
expect(testCasePO.requiredFields.get(2).getText()).toContain("Must be 1 or more");
});



});
Loading