Skip to content

Commit

Permalink
fixes for vega and volaris tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ostapwd committed Jan 13, 2025
1 parent 67ad9c9 commit 440d8cc
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 4 deletions.
2 changes: 2 additions & 0 deletions cypress/e2e/fees-&-fines/fee-fine-history.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ describe('Fees&Fines', () => {
cy.createTempUser([
permissions.uiUsersView.gui,
permissions.uiUsersfeefinesCRUD.gui,
permissions.feesfinesCheckPay.gui,
permissions.feesfinesPay.gui,
permissions.uiUsersViewServicePoints.gui,
permissions.uiUsersfeefinesView.gui,
permissions.uiFeeFinesActions.gui,
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/fees-&-fines/patron-groups.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('Fees&Fines', () => {
testData.username = userProperties.username;
Conditions.getConditionsViaApi().then((patronBlockConditions) => {
const testCondition =
Conditions.defaultConditions.defaultMaximumOustandingFeeFineBalance;
Conditions.defaultConditions.defaultMaximumOutstandingFeeFineBalance;
testData.testConditionId = patronBlockConditions.filter(
(conditionProperty) => conditionProperty.name === testCondition.name,
)[0].id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ describe('Patron notices', () => {
Permissions.uiCirculationSettingsNoticePolicies.gui,
Permissions.uiUsersfeefinesCRUD.gui,
Permissions.uiUserAccounts.gui,
Permissions.feesfinesCheckPay.gui,
Permissions.feesfinesPay.gui,
],
patronGroup.name,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ describe('Patron notices', () => {
permissions.uiCirculationSettingsNoticePolicies.gui,
permissions.uiUsersfeefinesCRUD.gui,
permissions.uiUserAccounts.gui,
permissions.feesfinesCheckPay.gui,
permissions.feesfinesPay.gui,
],
patronGroup.name,
)
Expand Down
8 changes: 8 additions & 0 deletions cypress/support/dictionary/permissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,14 @@ export default {
internal: 'ui-users.feesfines.actions.all',
gui: 'Users: Can create, edit and remove fees/fines',
},
feesfinesCheckPay: {
internal: 'feesfines.accounts.check-pay.post',
gui: 'accounts payment check post',
},
feesfinesPay: {
internal: 'feesfines.accounts.pay.post',
gui: 'accounts payment post',
},
uiUsersPatronBlocks: {
internal: 'ui-users.patron-blocks.all',
gui: 'Users: Can create, edit and remove patron blocks',
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/fragments/settings/users/conditions.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const resetCondition = (conditionValue) => {
};

const defaultConditions = {
defaultMaximumOustandingFeeFineBalance: {
defaultMaximumOutstandingFeeFineBalance: {
// required field
id: undefined,
name: 'Maximum outstanding fee/fine balance',
Expand Down
10 changes: 8 additions & 2 deletions cypress/support/fragments/users/payFeeFaine.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ export default {
cy.expect(rootModal.exists());
},
checkAmount: (amount) => cy.expect(amountTextfield.has({ value: amount.toFixed(2) })),
setPaymentMethod: ({ name: paymentMethodName }) => cy.get('div[class^=modal-] select[name=method]').select(paymentMethodName),
setPaymentMethod: ({ name: paymentMethodName }) => {
cy.get('div[class^=modal-] select[name=method]').select(paymentMethodName);
cy.wait(500);
},
fillInAdditionalInformation: (comment) => {
cy.do(rootModal.find(TextArea({ name: 'comment' })).fillIn(comment));
},
Expand All @@ -33,7 +36,10 @@ export default {
);
},
checkPartialPayConfirmation: () => cy.expect(confirmationModal.find(HTML(including('will be partially paid'))).exists),
setAmount: (amount) => cy.do(amountTextfield.fillIn(amount.toString())),
setAmount(amount) {
cy.do(amountTextfield.fillIn(amount.toString()));
cy.wait(500);
},
back: () => cy.do(
confirmationModal
.find(Button({ id: matching('clickable-confirmation-[0-9]+-cancel') }))
Expand Down
4 changes: 4 additions & 0 deletions cypress/support/fragments/users/userCharge.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ export default {
cy.expect(rootModal.exists());
},
fillRequiredFields: (ownerId, feeFineType, feeFineAmount) => {
cy.wait(500);
cy.do(rootModal.find(Select({ id: 'ownerId' })).choose(ownerId));
cy.wait(500);
cy.do(rootModal.find(Select({ id: 'feeFineType' })).choose(feeFineType));
cy.wait(500);
if (!feeFineAmount) {
cy.expect(rootModal.find(TextField('Fee/fine amount*')).has({ text: not('') }));
}
},
chargeOnly: () => {
cy.wait(500);
cy.do(rootModal.find(Button({ id: 'chargeOnly' })).click());
UsersCard.waitLoading();
},
Expand Down
2 changes: 2 additions & 0 deletions cypress/support/fragments/users/usersCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,10 @@ export default {
waitLoading: () => cy.expect(rootSection.exists()),

startFeeFine: () => {
cy.wait(500);
cy.do(actionsButton.click());
cy.do(Button('Create fee/fine').click());
cy.wait(500);
},

startRequest: () => {
Expand Down

0 comments on commit 440d8cc

Please sign in to comment.