Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement FAT-12499 #3404

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -0,0 +1,67 @@
import permissions from '../../support/dictionary/permissions';
import NewOrganization from '../../support/fragments/organizations/newOrganization';
import Organizations from '../../support/fragments/organizations/organizations';
import TopMenu from '../../support/fragments/topMenu';
import Users from '../../support/fragments/users/users';
import getRandomPostfix from '../../support/utils/stringTools';
import BankingInformation from '../../support/fragments/settings/organizations/bankingInformation';

describe('Organizations', () => {
const firstOrganization = { ...NewOrganization.defaultUiOrganizations };

const firstBankingInformation = {
name: `BankInfo_${getRandomPostfix()}`,
accountNumber: getRandomPostfix(),
};

let user;
let C423432User;

before(() => {
cy.getAdminToken();
BankingInformation.setBankingInformationValue(true);
Organizations.createOrganizationViaApi(firstOrganization).then((responseOrganizations) => {
firstOrganization.id = responseOrganizations;
});
cy.createTempUser([
permissions.uiOrdersView.gui,
permissions.uiOrganizationsViewBankingInformation.gui,
]).then((userProperties) => {
user = userProperties;
cy.login(userProperties.username, userProperties.password, {
path: TopMenu.organizationsPath,
waiter: Organizations.waitLoading,
});
});
});

after(() => {
cy.getAdminToken();
cy.loginAsAdmin({ path: TopMenu.organizationsPath, waiter: Organizations.waitLoading });
Organizations.searchByParameters('Name', firstOrganization.name);
Organizations.checkSearchResults(firstOrganization);
Organizations.selectOrganization(firstOrganization.name);
Organizations.editOrganization();
Organizations.deleteBankingInformation();
Organizations.closeDetailsPane();
Organizations.resetFilters();
Organizations.deleteOrganizationViaApi(firstOrganization.id);
BankingInformation.setBankingInformationValue(false);
Users.deleteViaApi(user.userId);
Users.deleteViaApi(C423432User.userId);
});

it(
'C423513: Adding Banking information records to an Organization with "Organizations: View, edit and create banking information" (thunderjet)',
{ tags: ['extendedPath', 'thunderjet'] },
() => {
Organizations.searchByParameters('Name', firstOrganization.name);
Organizations.checkSearchResults(firstOrganization);
Organizations.selectOrganization(firstOrganization.name);
Organizations.editOrganization();
Organizations.addBankingInformation(firstBankingInformation);
Organizations.closeDetailsPane();
Organizations.resetFilters();
},
);
});