Unverified Commit feba3861 authored by CleoGitHub's avatar CleoGitHub Committed by GitHub
Browse files

Feat (Bonita application) : Cypress file upload and cypress upgrade (#165)

* feat (Admin process list): Add file upload test

Covers [RUNTIME-489](https://bonitasoft.atlassian.net/browse/RUNTIME-489

)
Co-authored-by: default avatarVishalThapaliya <vishal.thapaliya@gmail.com>
parent 06d5ca3c
import { Given as given, Then as then, When as when } from "cypress-cucumber-preprocessor/steps";
const archivedCaseUrl = 'build/dist/resources/index.html?id=30003';
const openCaseUrl = 'build/dist/resources/index.html?id=30004';
const caseUrlWithoutId = 'build/dist/resources/index.html';
......@@ -208,7 +210,7 @@ then('I can see the open case ID', () => {
});
then('I cannot see the archived case ID', () => {
cy.get('pb-title').contains('Archived case id').should('not.be.visible');
cy.get('pb-title').contains('Archived case id').should('not.exist');
});
then('The correct BDM headers are visible', () => {
......
import { Given as given, Then as then, When as when } from "cypress-cucumber-preprocessor/steps";
const urlPrefix = 'build/dist/';
const url = urlPrefix + 'resources/index.html';
const defaultFilters = '&count=100';
......
import { Given as given, Then as then, When as when } from "cypress-cucumber-preprocessor/steps";
const url = 'build/dist/resources/index.html';
given('The resolution is set to mobile', () => {
......@@ -399,7 +401,11 @@ then('I see default user icon as the user modal icon', () => {
});
then('I don\'t see {string} as the user name', (userName) => {
cy.get('.text-right > .ng-binding').should('not.have.text', userName);
cy.get('.user-menu-name button span').should('not.have.text', userName);
});
then('The username button does not exist', () => {
cy.get('.user-menu-name button span').should('not.exist');
});
then('I see the app selection icon', () => {
......@@ -419,8 +425,7 @@ then('The image is not displayed', () => {
});
then('The current session modal is visible', () => {
cy.get('.modal').should('be.visible');
cy.waitFor('.modal', 10000);
cy.get('.modal', { timeout: 10000 }).should('be.visible');
});
then('The user first and last name {string} are visible', (firstAndLastName) => {
......@@ -436,7 +441,7 @@ then('The user email {string} is shown', (userEmail) => {
});
then('The technical user email is hidden', () => {
cy.contains('.user-details--break-all p', 'Email').should('not.be.visible');
cy.contains('.user-details--break-all p', 'Email').should('not.exist');
});
then('The language select is visible', () => {
......@@ -456,8 +461,8 @@ then('The apply and close buttons are visible', () => {
cy.get('button').contains('Close').should('be.visible');
});
then('The logout button is hidden', () => {
cy.get('.btn-danger').should('not.be.visible');
then('The logout button should not exist', () => {
cy.get('.btn-danger').should('not.exist');
});
then('The apply button is disabled', () => {
......
......@@ -54,14 +54,14 @@ Feature: The Bonita layout header in desktop resolution
And A user is connected as guest
When I visit the index page
Then The login link is displayed
And I don't see "guest" as the user name
And The username button does not exist
Scenario: The login button is hidden if sso is active and guest user is connected
Given The URL target to the application "appName1"
And A user is connected as guest with sso
When I visit the index page
Then The login link does not exist
And I don't see "guest" as the user name
And The username button does not exist
Scenario: The Bonita layout shows the user default icon
Given The URL target to the application "appName1"
......
......@@ -44,7 +44,7 @@ Feature: The Bonita layout current session modal in desktop resolution
When I visit the index page
And I click the user name
Then The current session modal is visible
And The logout button is hidden
And The logout button should not exist
Scenario: The current session modal has the user icon correctly set
Given The URL target to the application "appName1"
......
......@@ -19,8 +19,8 @@
},
"keywords": [],
"devDependencies": {
"cypress": "4.12.1",
"cypress-cucumber-preprocessor": "2.5.5"
"cypress": "9.5.1",
"cypress-cucumber-preprocessor": "4.3.1"
},
"cypress-cucumber-preprocessor": {
"step_definitions": "step_definitions/"
......
import { Given as given, Then as then, When as when } from "cypress-cucumber-preprocessor/steps";
const urlPrefix = 'build/dist/';
const url = urlPrefix + 'resources/index.html?id=1';
const urlWithoutId = urlPrefix + 'resources/index.html?id=1';
......@@ -313,7 +315,7 @@ then("{string} is shown at the end of the comments", (text) => {
});
then("There is no {string}", (text) => {
cy.get('.comments .item-value').contains(text).should('not.be.visible');
cy.contains('.comments .item-value', text).should('not.exist');
});
then("The input placeholder is {string}", (placeholder) => {
......@@ -329,11 +331,11 @@ then("The task list link has correct href", () => {
});
then("The no task message is not visible", () => {
cy.get('.item-value').contains('No task in the task list for this case.').should('not.visible');
cy.contains('.item-value', 'No task in the task list for this case.').should('not.exist');
});
then("The task list link is not visible", () => {
cy.get('a.item-value').should('not.visible');
cy.get('a.item-value').should('not.exist');
});
then("The process variables have the correct information", () => {
......@@ -426,7 +428,7 @@ then("I see the updated successfully message", () => {
});
then("The modal is closed", () => {
cy.contains('.modal').should('not.be.visible');
cy.contains('.modal').should('not.exist');
});
then("I see the value is updated for variable {string}", (variableNumber) => {
......
import { Given as given, Then as then, When as when } from "cypress-cucumber-preprocessor/steps";
const urlPrefix = 'build/dist/';
const defaultFilters = '&d=processDefinitionId&d=started_by&d=startedBySubstitute';
const processUrl = urlPrefix + 'API/bpm/process';
......@@ -316,8 +318,8 @@ then("The delete archived case modal is open and has a default state for {string
cy.contains('.modal-header h3', state).should('be.visible');
cy.contains('.modal-body p', 'The deleted case will be permanently deleted and will not be stored in the archives. Are you sure you want to delete it?').should('not.exist');
cy.contains('.modal-body p', 'The deleted case will be permanently deleted from the archives. Are you sure you want to delete it?').should('be.visible');
cy.get('.modal-body .glyphicon-remove-sign').should('not.be.visible');
cy.get('.modal-body .glyphicon-ok-sign').should('not.be.visible');
cy.get('.modal-body .glyphicon-remove-sign').should('not.exist');
cy.get('.modal-body .glyphicon-ok-sign').should('not.exist');
cy.contains('.modal-footer button', 'Delete').should('be.enabled');
cy.contains('.modal-footer button', 'Cancel').should('be.visible');
cy.contains('.modal-footer button', 'Close').should('not.exist');
......
import { Given as given, Then as then, When as when } from "cypress-cucumber-preprocessor/steps";
const urlPrefix = 'build/dist/';
const url = urlPrefix + 'resources/index.html';
const defaultFilters = '&d=processDefinitionId&d=started_by&d=startedBySubstitute&n=activeFlowNodes&n=failedFlowNodes';
......@@ -396,15 +398,15 @@ then("The delete open case modal is open and has a default state for {string}",
cy.contains('.modal-header h3', state).should('be.visible');
cy.contains('.modal-body p', 'The deleted case will be permanently deleted and will not be stored in the archives. Are you sure you want to delete it?').should('be.visible');
cy.contains('.modal-body p', 'The deleted case will be permanently deleted from the archives. Are you sure you want to delete it?').should('not.exist');
cy.get('.modal-body .glyphicon-remove-sign').should('not.be.visible');
cy.get('.modal-body .glyphicon-ok-sign').should('not.be.visible');
cy.get('.modal-body .glyphicon-remove-sign').should('not.exist');
cy.get('.modal-body .glyphicon-ok-sign').should('not.exist');
cy.contains('.modal-footer button', 'Delete').should('be.enabled');
cy.contains('.modal-footer button', 'Cancel').should('be.visible');
cy.contains('.modal-footer button', 'Close').should('not.exist');
});
then("There is no modal displayed", () => {
cy.get('.modal').should('not.visible');
cy.get('.modal').should('not.exist');
});
then("The deletion is successful", () => {
......
......@@ -12,7 +12,8 @@ Feature: The admin archived case list in desktop resolution
Given The filter response "default filter" is defined for open cases
And The filter response "default filter" is defined for archived cases
When I visit the admin case list page
And I click on "Archived cases" tab
Then I see an open case list page
When I click on "Archived cases" tab
Then I see an archived case list page
When I click on "Open cases" tab
Then I see an open case list page
......
import { Given as given, Then as then, When as when } from "cypress-cucumber-preprocessor/steps";
const urlPrefix = 'build/dist/';
const url = urlPrefix + 'resources/index.html';
const groupsUrl = 'API/identity/group';
......@@ -428,8 +430,8 @@ then("The create modal is open and has a default state for {string}", (state) =>
cy.contains('.modal-body', 'Display name').should('be.visible');
cy.contains('.modal-body', 'Description').should('be.visible');
cy.contains('.modal-body', 'Parent group').should('be.visible');
cy.get('.modal-body .glyphicon-remove-sign').should('not.be.visible');
cy.get('.modal-body .glyphicon-ok-sign').should('not.be.visible');
cy.get('.modal-body .glyphicon-remove-sign').should('not.exist');
cy.get('.modal-body .glyphicon-ok-sign').should('not.exist');
cy.contains('.modal-footer button', 'Create').should('be.disabled');
cy.contains('.modal-footer button', 'Cancel').should('be.visible');
cy.contains('.modal-footer button', 'Close').should('not.exist');
......@@ -437,15 +439,15 @@ then("The create modal is open and has a default state for {string}", (state) =>
then("The delete modal is open and has a default state for {string}", (state) => {
cy.contains('.modal-header h3', state).should('be.visible');
cy.get('.modal-body .glyphicon-remove-sign').should('not.be.visible');
cy.get('.modal-body .glyphicon-ok-sign').should('not.be.visible');
cy.get('.modal-body .glyphicon-remove-sign').should('not.exist');
cy.get('.modal-body .glyphicon-ok-sign').should('not.exist');
cy.contains('.modal-footer button', 'Delete').should('be.enabled');
cy.contains('.modal-footer button', 'Cancel').should('be.visible');
cy.contains('.modal-footer button', 'Close').should('not.exist');
});
then("There is no modal displayed", () => {
cy.get('.modal').should('not.visible');
cy.get('.modal').should('not.exist');
});
then("The {string} button in modal is {string}", (buttonName, buttonState) => {
......@@ -457,7 +459,7 @@ then("The parent group list is displayed", () => {
});
then("The parent group list is not displayed", () => {
cy.get('.modal-body .dropdown-menu').should('not.be.visible');
cy.get('.modal-body .dropdown-menu').should('not.exist');
});
then("The parent group input is filled with {string}", (parentGroupName) => {
......@@ -524,7 +526,7 @@ then("The type more message is displayed and disabled", () => {
});
then("The type more message is not displayed", () => {
cy.contains('.dropdown-menu button', 'Or type more...').should('not.be.visible');
cy.contains('.dropdown-menu button', 'Or type more...').should('not.exist');
});
then("I see {string} error message for {string}", (error, action) => {
......@@ -573,8 +575,8 @@ then("The user list modal is open and has no users for {string}", (state) => {
cy.contains('.modal-header h3', state).should('be.visible');
cy.get('.modal-body input').should('have.attr', 'placeholder', 'Search by first name, last name, or username').should('have.attr', 'readonly', 'readonly');
cy.contains('.modal-body h4', 'No users to display').should('be.visible');
cy.contains('.modal-body p.text-right', 'Users shown:').should('not.be.visible');
cy.contains('.modal-body button', 'Load more users').should('not.be.visible');
cy.contains('.modal-body p.text-right', 'Users shown:').should('not.exist');
cy.contains('.modal-body button', 'Load more users').should('not.exist');
cy.get('.modal-body .glyphicon-option-horizontal').should('not.exist');
cy.contains('.modal-footer button', 'Close').should('be.visible');
});
......@@ -582,7 +584,7 @@ then("The user list modal is open and has no users for {string}", (state) => {
then("The user list modal is open and has {int} users for {string}", (numberOfUsers, state) => {
cy.contains('.modal-header h3', state).should('be.visible');
cy.get('.modal-body input').should('have.attr', 'placeholder', 'Search by first name, last name, or username').should('not.have.attr', 'readonly', 'readonly');
cy.contains('.modal-body h4', 'No users to display').should('not.be.visible');
cy.contains('.modal-body h4', 'No users to display').should('not.exist');
cy.contains('.modal-body p.text-right', 'Users shown:').should('be.visible');
cy.contains('.modal-body button', 'Load more users').should('be.visible');
cy.contains('.modal-footer button', 'Close').should('be.visible');
......@@ -605,15 +607,15 @@ then("The sub-group list modal is open and has no sub-groups for {string}", (sta
cy.contains('.modal-header h3', state).should('be.visible');
cy.get('.modal-body input').should('have.attr', 'placeholder', 'Search by display name, or name').should('have.attr', 'readonly', 'readonly');
cy.contains('.modal-body h4', 'No sub-groups to display').should('be.visible');
cy.contains('.modal-body p.text-right', 'Sub-groups shown:').should('not.be.visible');
cy.contains('.modal-body button', 'Load more sub-groups').should('not.be.visible');
cy.contains('.modal-body p.text-right', 'Sub-groups shown:').should('not.exist');
cy.contains('.modal-body button', 'Load more sub-groups').should('not.exist');
cy.contains('.modal-footer button', 'Close').should('be.visible');
});
then("The sub-group list modal is open and has {int} sub-groups for {string}", (numberOfSubGroups, state) => {
cy.contains('.modal-header h3', state).should('be.visible');
cy.get('.modal-body input').should('have.attr', 'placeholder', 'Search by display name, or name').should('not.have.attr', 'readonly', 'readonly');
cy.contains('.modal-body h4', 'There are no sub-groups in this group').should('not.be.visible');
cy.contains('.modal-body h4', 'There are no sub-groups in this group').should('not.exist');
cy.contains('.modal-body p.text-right', 'Sub-groups shown:').scrollIntoView().should('be.visible');
cy.contains('.modal-body button', 'Load more sub-groups').should('be.visible');
cy.contains('.modal-footer button', 'Close').should('be.visible');
......@@ -627,8 +629,8 @@ then("The edit modal is open and has a default state for {string}, {string}, {st
cy.contains('.modal-body', 'Display name').should('be.visible');
cy.contains('.modal-body', 'Description').should('be.visible');
cy.contains('.modal-body', 'Parent group').should('be.visible');
cy.get('.modal-body .glyphicon-remove-sign').should('not.be.visible');
cy.get('.modal-body .glyphicon-ok-sign').should('not.be.visible');
cy.get('.modal-body .glyphicon-remove-sign').should('not.exist');
cy.get('.modal-body .glyphicon-ok-sign').should('not.exist');
cy.contains('.modal-footer button', 'Save').should('not.be.disabled');
cy.contains('.modal-footer button', 'Cancel').should('be.visible');
cy.contains('.modal-footer button', 'Close').should('not.exist');
......
......@@ -432,8 +432,8 @@ Feature: The Admin Groups in desktop resolution
When I click on the "pencil" glyphicon button in modal body
Then The parent group edition field should contain ""
And The parent group dropdown is not shown
When I click on the "Save" button in modal footer
Then The edition is successful with empty parent field
When I click on the "Cancel" button in modal footer
Then There is no modal displayed
Scenario: The edit group modal resets the old parent value correctly
Given The response "group edition success" is defined
......
import { Given as given, Then as then, When as when } from "cypress-cucumber-preprocessor/steps";
const url = 'build/dist/resources/index.html';
given('No file is selected', () => {
cy.get('.form-control').should('have.attr','placeholder','Click here to choose your .xml file');
});
given('The response for fileUpload is defined', () => {
cy.intercept('POST', 'build/dist/API/formFileUpload', {"filename":"ACME.xml","tempPath":"tmp_632726332956609779.xml","contentType":"text\/xml"});
});
given('The response for install Organisation is defined', () => {
cy.intercept('POST', 'build/dist/API/services/organization/import', {organizationDataUpload: "tmp_8603867932412969442.xml"});
})
when(`I\'m user with {string} bos_local`, (text) => {
cy.setCookie('BOS_Locale', text);
});
......@@ -13,6 +24,15 @@ when('I open the install-export organization page', () => {
cy.visit(url);
});
when("I click on attach icon", () => {
cy.get('.form-group .file-upload .input-group-btn').click();
})
when("I click on {string} button", (buttonName) => {
cy.contains('.btn-primary', buttonName).click();
})
then('I can download the file', () => {
cy.get('pb-link > .text-right > .ng-binding').should('have.attr', 'href', '../API/exportOrganization');
cy.get('pb-link > .text-right > .ng-binding').should('have.attr', 'target', '_blank');
......@@ -33,3 +53,17 @@ then('I see {string} label on the export button', (text) => {
then('I see the "Install" button being disabled', () => {
cy.get('pb-button > .text-right > .ng-binding').should('be.disabled');
});
then("It uploads a organization", () => {
cy.get('.form-group input[type="file"]').selectFile('test/mockServer/ACME.xml', {force: true});
cy.get('.form-group input[type="text"]').should('have.value', 'Uploading...');
cy.get('.form-group .file-upload input[type="text"]').should('have.value', 'ACME.xml');
})
then("The {string} button is enabled", (buttonName) => {
cy.contains('.btn-primary', buttonName).should('be.enabled');
});
then("The process is installed and I see {string}", (successMessage) => {
cy.contains('p', successMessage);
});
\ No newline at end of file
......@@ -27,4 +27,15 @@ Feature: The install-export Organization
Given I'm user with "es" bos_local
When I open the install-export organization page
Then I see "Instalar" label on the install button
And I see "Exportar" label on the export button
\ No newline at end of file
And I see "Exportar" label on the export button
Scenario: I install an organization
Given I'm user with "en" bos_local
And The response for fileUpload is defined
And The response for install Organisation is defined
When I open the install-export organization page
And I click on attach icon
Then It uploads a organization
Then The "Install" button is enabled
When I click on "Install" button
Then The process is installed and I see "Organization successfully installed"
\ No newline at end of file
import { Given as given, Then as then, When as when } from "cypress-cucumber-preprocessor/steps";
const urlPrefix = 'build/dist/';
const url = urlPrefix + 'resources/index.html';
const defaultFilters = '&d=deployedBy&f=activationState=DISABLED';
......@@ -400,13 +402,13 @@ then("A list of {string} items is displayed", (nbrOfItems) => {
then("The correct text is shown in enable modal", () => {
cy.contains('.modal', 'Enabling this process will make it visible to the users who can start it').should('be.visible');
cy.contains('.modal', 'Disabling this process will remove it from the list of processes that users can start.').should('not.be.visible');
cy.contains('.modal', 'This process is already disabled.').should('not.be.visible');
cy.contains('.modal', 'This process is already enabled.').should('not.be.visible');
cy.contains('.modal', 'An error has occurred. For more information, check the log file.').should('not.be.visible');
cy.contains('.modal', 'Access denied. For more information, check the log file.').should('not.be.visible');
cy.contains('.modal', 'Disabling process...').should('not.be.visible');
cy.contains('.modal', 'Enabling process...').should('not.be.visible');
cy.contains('.modal', 'Disabling this process will remove it from the list of processes that users can start.').should('not.exist');
cy.contains('.modal', 'This process is already disabled.').should('not.exist');
cy.contains('.modal', 'This process is already enabled.').should('not.exist');
cy.contains('.modal', 'An error has occurred. For more information, check the log file.').should('not.exist');
cy.contains('.modal', 'Access denied. For more information, check the log file.').should('not.exist');
cy.contains('.modal', 'Disabling process...').should('not.exist');
cy.contains('.modal', 'Enabling process...').should('not.exist');
});
then("I see enabling message", () => {
......@@ -419,7 +421,7 @@ then("The {string} button is disabled for item {string}", (iconName, processNumb
});
then("I see {string} error message for disabled processes", (errorCode) => {
// cy.contains('.modal', 'Enabling this process will make it visible to the users who can start it.').should('be.visible');
cy.contains('.modal', 'Enabling this process will make it visible to the users who can start it.').should('be.visible');
cy.contains('.modal', 'The process has not been enabled.').should('be.visible');
switch (errorCode) {
case '500':
......@@ -434,15 +436,4 @@ then("I see {string} error message for disabled processes", (errorCode) => {
default:
throw new Error("Unsupported case");
}
});
then("The correct text is shown in enable modal", () => {
cy.contains('.modal', 'Enabling this process will make it visible to the users who can start it').should('be.visible');
cy.contains('.modal', 'Disabling this process will remove it from the list of processes that users can start.').should('not.be.visible');
cy.contains('.modal', 'This process is already disabled.').should('not.be.visible');
cy.contains('.modal', 'This process is already enabled.').should('not.be.visible');
cy.contains('.modal', 'An error has occurred. For more information, check the log file.').should('not.be.visible');
cy.contains('.modal', 'Access denied. For more information, check the log file.').should('not.be.visible');
cy.contains('.modal', 'Disabling process...').should('not.be.visible');
cy.contains('.modal', 'Enabling process...').should('not.be.visible');
});
});
\ No newline at end of file
import { Given as given, Then as then, When as when } from "cypress-cucumber-preprocessor/steps";
const urlPrefix = 'build/dist/';
const url = urlPrefix + 'resources/index.html';
const defaultFilters = '&d=deployedBy&f=activationState=ENABLED';
......@@ -55,6 +58,12 @@ given("The page response {string} is defined", (filterType) => {
createRoute(urlPrefix + processListUrl + '?c=10&p=0&time=1*' + defaultFilters + defaultSortOrder, "refreshEnabledProcessesList", "GET");
createRoute(urlPrefix + processListUrl + '?c=10&p=0&time=1*&d=deployedBy&f=activationState=DISABLED' + defaultSortOrder, "refreshDisabledProcessesList", "GET");
break;
case 'file upload':
cy.intercept('POST', urlPrefix + 'API/processUpload', {"filename":"Pool.bar","tempPath":"tmp_632726332956609779.bar","contentType":"text\/xml"})
break;
case 'process installation':
cy.intercept('POST', urlPrefix + 'API/bpm/process', {"fileupload": "tmp_5586848544544004207.bar"});
break;
case 'disable state code 500':
createRouteWithResponseAndMethodAndStatus(urlPrefix + processListUrl + '/7150158626056333703',"processDisableRoute", 'emptyResult', "PUT", '500');
createRouteWithResponse(urlPrefix + processListUrl + '?c=10&p=0&time=1*', 'enabledProcesses5Route', 'enabledProcesses5');
......@@ -228,7 +237,7 @@ when("I click on {string} button on the item {string}", (iconName, itemNumber) =
});
when("I click on {string} button in the modal", (btnName) => {
cy.get('button').contains(btnName).click();
cy.get('.modal-footer button').contains(btnName).click();
});
when("I click on disable button in modal", () => {
......@@ -428,18 +437,18 @@ then("The {string} process modal is displayed for {string}", (fieldText, itemNam
});
then("The modal is closed",() => {
cy.get('.modal').should('not.visible');
cy.get('.modal').should('not.exist');
});
then("The correct text is shown in disable modal", () => {
cy.contains('.modal', 'Disabling this process will remove it from the list of processes that users can start.').should('be.visible');
cy.contains('.modal', 'Enabling this process will make it visible to the users who can start it').should('not.be.visible');
cy.contains('.modal', 'This process is already disabled.').should('not.be.visible');
cy.contains('.modal', 'This process is already enabled.').should('not.be.visible');
cy.contains('.modal', 'An error has occurred. For more information, check the log file.').should('not.be.visible');
cy.contains('.modal', 'Access denied. For more information, check the log file.').should('not.be.visible');
cy.contains('.modal', 'Disabling process...').should('not.be.visible');
cy.contains('.modal', 'Enabling process...').should('not.be.visible');
cy.contains('.modal', 'Enabling this process will make it visible to the users who can start it').should('not.exist');
cy.contains('.modal', 'This process is already disabled.').should('not.exist');
cy.contains('.modal', 'This process is already enabled.').should('not.exist');
cy.contains('.modal', 'An error has occurred. For more information, check the log file.').should('not.exist');
cy.contains('.modal', 'Access denied. For more information, check the log file.').should('not.exist');
cy.contains('.modal', 'Disabling process...').should('not.exist');
cy.contains('.modal', 'Enabling process...').should('not.exist');
});
then("I see {string} error message", (errorCode) => {
......@@ -467,9 +476,28 @@ then("The modal {string} button is disabled",(buttonLabel) => {
cy.get('.modal-footer button').contains(buttonLabel).should('be.disabled');
});
then("The modal {string} button is enabled",(buttonLabel) => {
cy.get('.modal-footer button').contains(buttonLabel).should('be.enabled');
});
then("The loading text is displayed", () => {
cy.get('button').contains('Load more processes').should('not.be.visible');
cy.contains('Processes shown:').should('not.be.visible');
cy.get('.text-center').contains('Loading processes...').should('be.visible');
cy.get('h4').should('not.exist');
});
then("The process is installed", () => {
cy.contains(".modal-body p", "Process successfully installed")
});
when("I click on attach icon", () => {
cy.get('.modal-body .file-upload .input-group-btn').click();
});
then("It uploads a process", () => {
cy.get('.modal-body input[type="file"]').selectFile('test/mockServer/Pool.bar', {force: true});
cy.get('.modal-body input[type="text"]').should('have.value', 'Uploading...');
cy.get('.modal-body .file-upload input[type="text"]').should('have.value', 'Pool.bar');
});
\ No newline at end of file
......@@ -129,4 +129,16 @@ Feature: The enabled process list in desktop resolution
And I click on install button in the page
Then The modal "Install" button is disabled
When I click on "Cancel" button in the modal
Then The modal is closed
\ No newline at end of file
Then The modal is closed
Scenario: The install modal should install a process
Given The page response "file upload" is defined
And The page response "default filter with headers" is defined
And The page response "process installation" is defined
When I visit admin process list page