Skip to content

Commit

Permalink
Merge pull request #1492 from ProcessMaker/fix_testCases
Browse files Browse the repository at this point in the history
qa_fix_testCases
  • Loading branch information
pmoskrojas authored Dec 8, 2023
2 parents 26f24fd + 87d5e7c commit 150d754
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
5 changes: 1 addition & 4 deletions tests/e2e/specs/DatePicker.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,17 +342,14 @@ describe('Date Picker', () => {
});
it("Date picker with Required validation shouldn't allow the user to submit the date if empty", () => {
const date = moment(new Date()).format('MM/DD/YYYY');


cy.showValidationOnLoad();

cy.get('[data-cy=controls-FormDatePicker]').drag('[data-cy=screen-drop-zone]', 'bottom');
cy.get('[data-cy=screen-element-container]').click();
cy.setMultiselect('[data-cy=inspector-dataFormat]', 'Date');
cy.get('[data-cy=add-rule]').click();
cy.setMultiselect('[data-cy=select-rule]', 'Required');
cy.get('[data-cy=save-rule]').click();
cy.get('[data-cy=controls-FormButton]').last().drag('[data-cy=screen-element-container]', 'bottom');
cy.get('[data-cy=controls-FormButton]').first().drag('[data-cy=screen-element-container]', 'bottom');

cy.get('[data-cy=mode-preview]').click();
cy.get('.invalid-feedback').contains('Field is required');
Expand Down
3 changes: 3 additions & 0 deletions tests/e2e/specs/DeviceVisivilityInspector.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ describe('Device Visiblility Inspector', () => {
cy.visit('/');
//Step 1: Add Loop
addControl('Loop');
cy.openAcordeon("collapse-1");

//Step 2: Add Line input inside the loop
addControlInsideLoop(1,nodeControls.formInput);
Expand Down Expand Up @@ -329,6 +330,7 @@ describe('Device Visiblility Inspector', () => {
it('Verify Device Visibility of controls inside a table', () => {
cy.visit('/');
cy.openAcordeon("collapse-2");
cy.openAcordeon("collapse-1");
//Step 1: Add Loop
addControl('Multicolumn / Table');

Expand Down Expand Up @@ -357,6 +359,7 @@ describe('Device Visiblility Inspector', () => {
it('Verify Device Visibility of controls inside a table mobile', () => {
cy.visit('/');
cy.openAcordeon("collapse-2");
cy.openAcordeon("collapse-1");
//Step 1: Add Table
addControl('Multicolumn / Table');

Expand Down
10 changes: 9 additions & 1 deletion tests/e2e/specs/Loop.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ describe('Loop control', () => {
cy.get('[data-cy=inspector-add]').click();

// Add input to loop
cy.openAcordeon("collapse-1");
cy.get('[data-cy=controls-FormInput]').drag('[data-cy=screen-element-container] .column-draggable div', 'bottom');

// Preview
Expand Down Expand Up @@ -65,6 +66,7 @@ describe('Loop control', () => {
cy.get('[data-cy=inspector-source]').select('existing');

// Add input to loop
cy.openAcordeon("collapse-1");
cy.get('[data-cy=controls-FormInput]').drag('[data-cy=screen-element-container] .column-draggable div', 'bottom');
cy.get('[data-cy=controls-FormInput]').drag('[data-cy=screen-element-container] .column-draggable div', 'bottom');

Expand Down Expand Up @@ -127,6 +129,7 @@ describe('Loop control', () => {
cy.on('window:alert', msg => alert = msg);

// Add loop control
cy.openAcordeon("collapse-2");
cy.get('[data-cy=controls-FormLoop]').drag('[data-cy=screen-drop-zone]', 'bottom');
cy.get('[data-cy=screen-element-container]').click();
cy.get('[data-cy=inspector-name]');
Expand All @@ -141,6 +144,7 @@ describe('Loop control', () => {
cy.get('[data-cy=inspector-conditionalHide]').clear().type('name != "foo"');

// Add input to multicolumn
cy.openAcordeon("collapse-1");
cy.get('[data-cy=controls-FormInput]').drag('.mb-1 > :nth-child(1) > .row > :nth-child(1)', 'bottom');

// Configure Validation rule
Expand Down Expand Up @@ -177,7 +181,8 @@ describe('Loop control', () => {
let alert = false;
cy.on('window:alert', msg => alert = msg);

// Add loop control
// Add loop contro
cy.openAcordeon("collapse-2");
cy.get('[data-cy=controls-FormLoop]').drag('[data-cy=screen-drop-zone]', 'bottom');
cy.get('[data-cy=screen-element-container]').click();
cy.get('[data-cy=inspector-name]');
Expand All @@ -193,6 +198,7 @@ describe('Loop control', () => {
cy.get('[data-cy=inspector-conditionalHide]').clear().type('name != "foo"');

// Add input to nested loop
cy.openAcordeon("collapse-1");
cy.get('[data-cy=controls-FormInput]').drag('.m-2 > .column-draggable > div', 'bottom');

// Configure Input Validation rule
Expand Down Expand Up @@ -269,6 +275,7 @@ describe('Loop control', () => {
cy.showValidationOnLoad();
let alert = false;
cy.on('window:alert', msg => alert = msg);
cy.openAcordeon("collapse-2");

// Add loop control
cy.get('[data-cy=controls-FormLoop]').drag('[data-cy=screen-drop-zone]', 'bottom');
Expand All @@ -286,6 +293,7 @@ describe('Loop control', () => {
cy.get('[data-cy=inspector-conditionalHide]').clear().type('name != "foo"');

// Add submit button
cy.openAcordeon("collapse-1");
cy.get('[data-cy=controls-FormButton]').contains('Submit Button').drag('[data-cy=screen-element-container]', 'bottom');

// Set preview data
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/specs/MultiColumn.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ describe('MultiColumns', () => {
it('Configure using JSON', () => {
cy.visit('/');
cy.openAcordeon("collapse-2");
cy.openAcordeon("collapse-1");
cy.get('[data-cy=controls-FormMultiColumn]').drag('[data-cy=screen-drop-zone]', 'bottom');
cy.get('[data-cy=screen-element-container]').click();
cy.get('[data-cy=controls-FormInput]').drag('[data-cy=screen-element-container] .column-draggable:empty');
Expand Down Expand Up @@ -57,7 +58,7 @@ describe('MultiColumns', () => {
cy.get('[data-cy=inspector-add-column-modal]').should('contain.text', 'The total size of the columns exceeds 12');
cy.get('[data-cy=inspector-add-column-width]').clear().type('8');
cy.get('[data-cy=inspector-add-column-modal] button.btn-primary').click();

cy.openAcordeon("collapse-1");
cy.get('[data-cy=controls-FormInput]').drag('[data-cy=screen-element-container] .column-draggable:empty');
cy.get('[data-cy=controls-FormInput]').drag('[data-cy=screen-element-container] .column-draggable:empty');

Expand Down
1 change: 1 addition & 0 deletions tests/e2e/specs/Pagination.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const data = {
beforeEach(() => {
cy.visit('/');
cy.openAcordeon("collapse-2");
cy.openAcordeon("collapse-1");
cy.get('[data-cy=controls-FormRecordList]').drag('[data-cy=screen-drop-zone]', 'bottom');
cy.get('[data-cy=toolbar-add]').click({force: true});
cy.get('[data-cy=add-page-name]').type('page2');
Expand Down

0 comments on commit 150d754

Please sign in to comment.