-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#3368: Add anet object forms display test for no custom fields
- Loading branch information
1 parent
03668ad
commit 7f3ada3
Showing
3 changed files
with
83 additions
and
5 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
client/tests/webdriver/noCustomFieldsSpecs/anetObjectForms.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// import { expect } from "chai" | ||
import CreateAuthorizationGroup from "../pages/createAuthorizationGroup.page" | ||
import CreatePerson from "../pages/createNewPerson.page" | ||
import CreateTask from "../pages/createNewTask.page" | ||
import CreateOrganization from "../pages/CreateOrganization.page" | ||
import CreateReport from "../pages/createReport.page" | ||
import EditPosition from "../pages/editPosition.page" | ||
import CreateNewLocation from "../pages/location/createNewLocation.page" | ||
|
||
// Forms should work just fine without custom fields | ||
|
||
describe("When looking at anet object forms with dictionary that doesn't include custom fields", () => { | ||
it("Should see that report form successfully loads", () => { | ||
CreateReport.open() | ||
CreateReport.form.waitForExist() | ||
CreateReport.form.waitForDisplayed() | ||
}) | ||
it("Should see that person form successfully loads", () => { | ||
CreatePerson.openAsSuperUser() | ||
CreatePerson.form.waitForExist() | ||
CreatePerson.form.waitForDisplayed() | ||
}) | ||
it("Should see that task form successfully loads", () => { | ||
CreateTask.openAsAdmin() | ||
CreateTask.form.waitForExist() | ||
CreateTask.form.waitForDisplayed() | ||
}) | ||
it("Should see that authorization groups form successfully loads", () => { | ||
CreateAuthorizationGroup.open() | ||
CreateAuthorizationGroup.form.waitForExist() | ||
CreateAuthorizationGroup.form.waitForDisplayed() | ||
}) | ||
it("Should see that location form successfully loads", () => { | ||
CreateNewLocation.open() | ||
CreateNewLocation.createButton.click() | ||
CreateNewLocation.nameRequiredError.waitForExist() | ||
CreateNewLocation.nameRequiredError.waitForDisplayed() | ||
}) | ||
it("Should see that position form successfully loads", () => { | ||
EditPosition.open() | ||
EditPosition.form.waitForExist() | ||
EditPosition.form.waitForDisplayed() | ||
}) | ||
it("Should see that organization form successfully loads", () => { | ||
CreateOrganization.open() | ||
CreateOrganization.form.waitForExist() | ||
CreateOrganization.form.waitForDisplayed() | ||
}) | ||
}) |
5 changes: 0 additions & 5 deletions
5
client/tests/webdriver/noCustomFieldsSpecs/basicMaths.spec.js
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
client/tests/webdriver/pages/createNewOrganization.page.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import Page from "./page" | ||
|
||
const PAGE_URL = "/organizations/new" | ||
|
||
class CreateOrganization extends Page { | ||
get form() { | ||
return browser.$("form.form-horizontal") | ||
} | ||
|
||
get alertSuccess() { | ||
return browser.$(".alert-success") | ||
} | ||
|
||
openAsSuperUser() { | ||
super.openAsSuperUser(PAGE_URL) | ||
} | ||
|
||
openAsAdmin() { | ||
super.openAsAdminUser(PAGE_URL) | ||
} | ||
|
||
waitForAlertSuccessToLoad() { | ||
if (!this.alertSuccess.isDisplayed()) { | ||
this.alertSuccess.waitForExist() | ||
this.alertSuccess.waitForDisplayed() | ||
} | ||
} | ||
|
||
submitForm() { | ||
this.submitButton.click() | ||
} | ||
} | ||
|
||
export default new CreateOrganization() |