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

Automated UI tests for bursar export plugin #1813

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
4891819
Added Duke and Cornell test files and updated helper functions
danetsao Aug 7, 2023
fc83873
Added run manully function
danetsao Aug 8, 2023
0addf36
Added openAccordion, aggregateByPatron, basic format functions
danetsao Aug 10, 2023
d85599e
Cleaned up helper functions
danetsao Aug 10, 2023
3644efb
Added transfer account helper function
danetsao Aug 10, 2023
dcfd636
Added verify expect statementes for each section
danetsao Aug 14, 2023
e01db80
Change all double quotes to single quotes
danetsao Aug 14, 2023
fa69414
Updated verify helper functions
danetsao Aug 15, 2023
41cfeb4
Updated verify helper functions
danetsao Aug 15, 2023
a158a2a
Added format clear helper function
danetsao Aug 15, 2023
ad9b927
Added ESLint code fixes
danetsao Aug 15, 2023
2b751e8
Completed scheduling helper functions
nhanaa Aug 15, 2023
7ed872e
Added Cornell format helper functions
danetsao Aug 15, 2023
ca7d143
Merge branch 'danetsao' of github.com:ualibweb/stripes-testing into d…
danetsao Aug 15, 2023
b8838d1
Added Header Format and Account Data Format verify helper functions
danetsao Aug 15, 2023
d4fdb5f
Added basic outline for Duke bursar file
danetsao Aug 15, 2023
3726329
Added Duke body and header function
danetsao Aug 16, 2023
d59afcd
Fix problem with scheduling weekdays multiselect
nhanaa Aug 18, 2023
8fd4897
Merge pull request #1 from ualibweb/pax
danetsao Aug 18, 2023
00dd91e
Added Duke verify functions, header and body
danetsao Aug 18, 2023
3478bde
Added Alabama file
danetsao Aug 28, 2023
56b006f
Merge pull request #2 from ualibweb/danetsao
nhanaa Sep 6, 2023
f1ed3a4
Set up precondition data and check file content (#12)
GoZaddy Oct 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added openAccordion, aggregateByPatron, basic format functions
danetsao committed Aug 10, 2023
commit 0addf36ccfa153c1788678e767b32c738acc5ba0
Original file line number Diff line number Diff line change
@@ -11,6 +11,10 @@ describe("Build the Cornell bursar transfer file", () => {
});
});

it("should be able to open all the panes", () => {
TransferFeeFine.openAllPanes();
});

it("should be able to set scheduling", () => {
TransferFeeFine.setTransferCriteriaScheduling(
"Weeks",
@@ -22,7 +26,6 @@ describe("Build the Cornell bursar transfer file", () => {

it("should be able to set no criteria", () => {
TransferFeeFine.setCriteria(false);

});

// Aggregate by patron: Box unchecked
@@ -32,7 +35,15 @@ describe("Build the Cornell bursar transfer file", () => {

// Header Format
it("should be able to set header format", () => {
TransferFeeFine.setDataFormatSection();
// get the parent element that contains text 'Header Format', then loop through its children and press the trash icon for each
cy.get('.dropdown-menu:has("Header format")').parent().within(() => {
cy.get("button[class^='iconButton']").each((el) => {
cy.wrap(el).click();
});
}
);


});

// Account Data Format
@@ -45,5 +56,4 @@ describe("Build the Cornell bursar transfer file", () => {
TransferFeeFine.runManually();
});

// Verify that the transfer was successful
});
36 changes: 20 additions & 16 deletions cypress/support/fragments/users/transferFeeFine.js
Original file line number Diff line number Diff line change
@@ -29,11 +29,6 @@ export default {
cy.do([
TextField({ name: 'scheduling.interval' }).fillIn(interval)
]);
cy.do([
// get the multi-select element, then choose the weekday buttons
MultiSelect({ name: 'scheduling.weekdays' }).choose(weekDays)

]);
}
else if (frequency === 'Days') {
cy.do([
@@ -47,19 +42,18 @@ export default {

setAggregateByPatron(aggregate) {
if (!aggregate) {
// check if the box is already unchecked
cy.expect(Button({ text: 'Group data by patron' }).exists());
// uncheck the box
cy.do([
Button({ text: 'Group data by patron' }).click()
]);
// it is an input checkbox wiht name aggregate
cy.get('input[name="aggregate"]').uncheck(
{ force: true }
);
}
},

runManually() {
cy.do([
Button({ text: 'Run manually' }).click(),
]);
cy.get('@alert').should('have.been.calledOnceWith', 'Job has been scheduled')
},

typeScheduleTime(time) {
@@ -75,17 +69,27 @@ export default {
cy.expect(TextField({ name: 'scheduleTime', value: time }).exists());
},

// All three of our acceptance tests use no criteria for the Criteria field
setCriteria(criteria) {
if (!criteria) {
cy.do(Select({ name: 'criteria.type' }).choose('No criteria (always run)'));
}
},

// sectionName: string like 'Header', 'Account Data', 'Footer'
// dataFormat will be a list of options we config
setDataFormatSection(sectionName, dataFormat) {

openAllPanes() {
// see if you can find a button that says "Collapse all"
if (Button({ text: 'Collapse all' }).exists()) {
// if you can find it, click it then click the new button "Expand all"
cy.do([
Button({ text: 'Collapse all' }).click(),
Button({ text: 'Expand all' }).click()
]);
}
else {
// if you can't find it, click the button "Expand all"
cy.do([
Button({ text: 'Expand all' }).click()
]);
}
},

setAmount: (amount) => cy.do(amountTextfield.fillIn(amount.toFixed(2))),