-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into FAT-13622
- Loading branch information
Showing
17 changed files
with
144 additions
and
40 deletions.
There are no files selected for viewing
76 changes: 76 additions & 0 deletions
76
cypress/e2e/finance/funds/making-an-existing-fund-restricted-by-location.cy.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 |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import permissions from '../../../support/dictionary/permissions'; | ||
import FinanceHelp from '../../../support/fragments/finance/financeHelper'; | ||
import FiscalYears from '../../../support/fragments/finance/fiscalYears/fiscalYears'; | ||
import Funds from '../../../support/fragments/finance/funds/funds'; | ||
import Ledgers from '../../../support/fragments/finance/ledgers/ledgers'; | ||
import TopMenu from '../../../support/fragments/topMenu'; | ||
import Users from '../../../support/fragments/users/users'; | ||
import NewLocation from '../../../support/fragments/settings/tenant/locations/newLocation'; | ||
import ServicePoints from '../../../support/fragments/settings/tenant/servicePoints/servicePoints'; | ||
|
||
describe('ui-finance: Funds', () => { | ||
const defaultFund = { ...Funds.defaultUiFund }; | ||
const defaultFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; | ||
const defaultLedger = { ...Ledgers.defaultUiLedger }; | ||
let user; | ||
let servicePointId; | ||
let location; | ||
|
||
before(() => { | ||
cy.getAdminToken(); | ||
|
||
FiscalYears.createViaApi(defaultFiscalYear).then((response) => { | ||
defaultFiscalYear.id = response.id; | ||
defaultLedger.fiscalYearOneId = defaultFiscalYear.id; | ||
|
||
Ledgers.createViaApi(defaultLedger).then((ledgerResponse) => { | ||
defaultLedger.id = ledgerResponse.id; | ||
defaultFund.ledgerId = defaultLedger.id; | ||
Funds.createViaApi(defaultFund).then((fundResponse) => { | ||
defaultFund.id = fundResponse.fund.id; | ||
}); | ||
}); | ||
}); | ||
|
||
ServicePoints.getViaApi().then((servicePoint) => { | ||
servicePointId = servicePoint[0].id; | ||
NewLocation.createViaApi(NewLocation.getDefaultLocation(servicePointId)).then((res) => { | ||
location = res; | ||
}); | ||
}); | ||
|
||
cy.createTempUser([permissions.uiFinanceViewEditCreateFundAndBudget.gui]).then( | ||
(userProperties) => { | ||
user = userProperties; | ||
cy.login(userProperties.username, userProperties.password, { | ||
path: TopMenu.fundPath, | ||
waiter: Funds.waitLoading, | ||
}); | ||
}, | ||
); | ||
}); | ||
|
||
after(() => { | ||
cy.getAdminToken(); | ||
Funds.deleteFundViaApi(defaultFund.id); | ||
Ledgers.deleteledgerViaApi(defaultLedger.id); | ||
FiscalYears.deleteFiscalYearViaApi(defaultFiscalYear.id); | ||
Users.deleteViaApi(user.userId); | ||
}); | ||
|
||
it( | ||
'C423530 Marking Fund as restricted by location when create a fund (thunderjet)', | ||
{ tags: ['criticalPath', 'thunderjet'] }, | ||
() => { | ||
FinanceHelp.searchByName(defaultFund.name); | ||
Funds.selectFund(defaultFund.name); | ||
Funds.editBudget(); | ||
Funds.clickRestrictByLocationsCheckbox(); | ||
Funds.varifyLocationSectionExist(); | ||
Funds.addLocationToFund(location.name); | ||
Funds.save(); | ||
Funds.varifyFundIsSaved(); | ||
Funds.waitForFundDetailsLoading(); | ||
}, | ||
); | ||
}); |
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
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
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
Oops, something went wrong.