-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Miguel Garcia Garcia <[email protected]>
- Loading branch information
Showing
15 changed files
with
249 additions
and
119 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,31 +1,33 @@ | ||
import { CMS } from "../../routes"; | ||
import { CMS, CMS_NEW } from "../../routes"; | ||
|
||
describe("Form Builder", function() { | ||
describe("Form Builder", function () { | ||
// with respect to the current working folder | ||
|
||
it("Select the CMS Analysis from the predefined schems", function() { | ||
it("Select the CMS Analysis from the predefined schemas", function () { | ||
cy.loginUrl("[email protected]", "infoinfo", CMS); | ||
|
||
// select the div contains the CMS Analysis text | ||
cy.get("[data-cy=admin-predefined-content]") | ||
.contains("CMS Analysis") | ||
.click(); | ||
cy.get("[data-cy=editSchemaButton]").click(); | ||
|
||
cy.url().should("include", "cms-analysis"); | ||
}); | ||
|
||
it("Select the CMS Statistics Questionnaire from the predefined schems", function() { | ||
it("Select the CMS Statistics Questionnaire from the predefined schemas", function () { | ||
cy.loginUrl("[email protected]", "infoinfo", CMS); | ||
|
||
// select the div contains the CMS Analysis text | ||
cy.get("[data-cy=admin-predefined-content]") | ||
.contains("CMS Statistics Questionnaire") | ||
.click(); | ||
cy.get("[data-cy=editSchemaButton]").click(); | ||
|
||
cy.url().should("include", "cms-stats-questionnaire"); | ||
}); | ||
|
||
it("Start a new schema on your own", function() { | ||
it("Start a new schema on your own", function () { | ||
cy.loginUrl("[email protected]", "infoinfo", CMS); | ||
|
||
const name = "Name of the form"; | ||
|
@@ -38,7 +40,7 @@ describe("Form Builder", function() { | |
// create the form | ||
cy.get("[data-cy=admin-form-submit]").click(); | ||
|
||
cy.url().should("include", `${CMS}/new`); | ||
cy.url().should("include", CMS_NEW); | ||
}); | ||
|
||
// it("Download Schema File", () => { | ||
|
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
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
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
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
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
64 changes: 50 additions & 14 deletions
64
ui/cap-react/src/antd/admin/components/SelectContentType.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
15 changes: 8 additions & 7 deletions
15
ui/cap-react/src/antd/admin/containers/SelectContentType.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 |
---|---|---|
@@ -1,20 +1,21 @@ | ||
import { connect } from "react-redux"; | ||
import SelectContentType from "../components/SelectContentType"; | ||
import { selectContentType } from "../../../actions/schemaWizard"; | ||
import { | ||
selectContentTypeEdit, | ||
selectContentTypeView, | ||
} from "../../../actions/schemaWizard"; | ||
|
||
function mapStateToProps(state) { | ||
return { | ||
contentTypes: state.auth.getIn(["currentUser", "depositGroups"]) | ||
contentTypes: state.auth.getIn(["currentUser", "depositGroups"]), | ||
}; | ||
} | ||
|
||
function mapDispatchToProps(dispatch) { | ||
return { | ||
select: id => dispatch(selectContentType(id)) | ||
selectEdit: id => dispatch(selectContentTypeEdit(id)), | ||
selectView: id => dispatch(selectContentTypeView(id)), | ||
}; | ||
} | ||
|
||
export default connect( | ||
mapStateToProps, | ||
mapDispatchToProps | ||
)(SelectContentType); | ||
export default connect(mapStateToProps, mapDispatchToProps)(SelectContentType); |
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
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
Oops, something went wrong.