Skip to content

Commit

Permalink
add skeleton for testing multi-form-input feature
Browse files Browse the repository at this point in the history
  • Loading branch information
RFSH committed Sep 13, 2023
1 parent 7716e23 commit 907534d
Show file tree
Hide file tree
Showing 16 changed files with 158 additions and 210 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ E2EDIrecordImmutable=test/e2e/specs/default-config/recordedit/immutable-inputs.c
E2EDIrecordEdit=test/e2e/specs/all-features-confirmation/recordedit/edit-delete.conf.js
# not part of the make recordedit command anymore
# E2ErecordEditNoDeleteBtn=test/e2e/specs/delete-prohibited/recordedit/no-delete-btn.conf.js
E2EDIrecordMultiAdd=test/e2e/specs/default-config/recordedit/add-x-forms.conf.js
E2EDIrecordMultiFormInput=test/e2e/specs/default-config/recordedit/multi-form-input.conf.js
E2EDIrecordMultiEdit=test/e2e/specs/default-config/recordedit/multi-edit.conf.js
E2EDrecordEditCompositeKey=test/e2e/specs/default-config/recordedit/composite-key.conf.js
E2EDrecordEditDomainFilter=test/e2e/specs/default-config/recordedit/domain-filter.conf.js
Expand Down Expand Up @@ -92,7 +92,7 @@ Manualrecordset=test/manual/specs/recordset.conf.js
NAVBAR_TESTS=$(E2Enavbar) $(E2EnavbarHeadTitle) $(E2EnavbarCatalogConfig)
RECORD_TESTS=$(E2EDrecord) $(E2ErecordNoDeleteBtn) $(E2EDrecordRelatedTable) $(E2EDrecordCopy) $(E2EDrecordLinks)
RECORDSET_TESTS=$(E2EDrecordset) $(E2ErecordsetAdd) $(E2EDrecordsetEdit) $(E2EDrecordsetIndFacet) $(E2EDrecordsetHistFacet) $(E2ErecordsetSavedQuery)
RECORDADD_TESTS=$(E2EDIrecordAdd) $(E2EDIrecordMultiAdd) $(E2EDIrecordImmutable) $(E2ErecordEditForeignKeyDropdown)
RECORDADD_TESTS=$(E2EDIrecordAdd) $(E2EDIrecordMultiFormInput) $(E2EDIrecordImmutable) $(E2ErecordEditForeignKeyDropdown)
RECORDEDIT_TESTS=$(E2EDIrecordEdit) $(E2EDIrecordMultiEdit) $(E2EDrecordEditCompositeKey) $(E2EDrecordEditSubmissionDisabled) $(E2EDIrecordEditMultiColTypes) $(E2EDrecordEditDomainFilter) $(E2ErecordEditInputIframe)
PERMISSIONS_TESTS=$(E2EmultiPermissionsVisibility)
FOOTER_TESTS=$(E2Efooter)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"record/links.config.json",

"recordedit/immutable-inputs.config.json",
"recordedit/add-multi.config.json",
"recordedit/multi-form-input.config.json",
"recordedit/composite-key.config.json",
"recordedit/domain-filter.config.json",
"recordedit/foreign-key-dropdown.config.json",
Expand Down
15 changes: 0 additions & 15 deletions test/e2e/data_setup/config/recordedit/add-multi.config.json

This file was deleted.

9 changes: 0 additions & 9 deletions test/e2e/data_setup/config/recordedit/add-multi.dev.json

This file was deleted.

15 changes: 15 additions & 0 deletions test/e2e/data_setup/config/recordedit/multi-form-input.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"catalog": {},
"schema": {
"name": "multi-form-input",
"createNew": true,
"path": "test/e2e/data_setup/schema/recordedit/multi-form-input.json"
},
"tables": {
"createNew": true
},
"entities": {
"createNew": true,
"path": "test/e2e/data_setup/data/multi-form-input"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"setup": {
"schemaConfigurations": [
"recordedit/multi-form-input.config.json"
],
"schema": "multi-form-input"
},
"cleanup" : true
}
5 changes: 0 additions & 5 deletions test/e2e/data_setup/data/multi-add/f1.json

This file was deleted.

171 changes: 0 additions & 171 deletions test/e2e/data_setup/schema/recordedit/multi-add.json

This file was deleted.

25 changes: 25 additions & 0 deletions test/e2e/data_setup/schema/recordedit/multi-form-input.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"schema_name": "multi-form-input",
"tables": {
"main": {
"table_name": "main",
"schema_name": "multi-form-input",
"kind": "table",
"keys": [{"unique_columns": ["id"]}],
"column_definitions": [
{
"name": "id",
"nullok": false,
"type": { "typename": "serial4" }
},
{
"name": "text_col",
"nullok": true,
"type": {
"typename": "text"
}
}
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ describe('Record Add', function() {

if (tableParams.files.length == 0) {
it("should click and add an extra record.", function(done) {
chaisePage.clickButton(chaisePage.recordEditPage.getMultiFormInputSubmitButton()).then(function () {
chaisePage.clickButton(chaisePage.recordEditPage.getCloneFormInputSubmitButton()).then(function () {
done();
}).catch(chaisePage.catchTestError(done));
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ describe('Record Add with defaults', function() {
// Foreign key columns
it("should initialize foreign key inputs with their default value.", function() {
// the clone will be disabled while data is loading.
browser.wait(EC.elementToBeClickable(chaisePage.recordEditPage.getMultiFormInputSubmitButton()));
browser.wait(EC.elementToBeClickable(chaisePage.recordEditPage.getCloneFormInputSubmitButton()));

foreignKeyInput = chaisePage.recordEditPage.getForeignKeyInputDisplay("foreign_key", 1);
foreignKeyDropdownInput = chaisePage.recordEditPage.getForeignKeyInputDisplay("foreign_key_dropdown", 1);
Expand All @@ -273,7 +273,7 @@ describe('Record Add with defaults', function() {
// Asset columns
it("should initialize asset column inputs with their default value.", function() {
// the clone btn will be disabled while data is loading.
browser.wait(EC.elementToBeClickable(chaisePage.recordEditPage.getMultiFormInputSubmitButton()));
browser.wait(EC.elementToBeClickable(chaisePage.recordEditPage.getCloneFormInputSubmitButton()));

const assetTextInput = chaisePage.recordEditPage.getTextFileInputForAColumn("asset", 1)
expect(assetTextInput.getText()).toBe(values.asset_value, "Asset input default is incorrect");
Expand Down
15 changes: 15 additions & 0 deletions test/e2e/specs/default-config/recordedit/multi-form-input.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
var pConfig = require('./../../../utils/protractor.configuration.js');

var config = pConfig.getConfig({
configFileName: 'recordedit/multi-form-input.dev.json',
chaiseConfigFilePath: 'test/e2e/specs/default-config/chaise-config.js',
specs: [
"multi-form-input.spec.js"
],
setBaseUrl: function(browser, data) {
browser.params.url = process.env.CHAISE_BASE_URL;
return browser.params.url;
}
});

exports.config = config;
Loading

0 comments on commit 907534d

Please sign in to comment.