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

Portal Test Management #51

Merged
merged 2 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -18,53 +18,60 @@ const STUDENTS = ["STUDENT4"];

context("Verify Student Acitivty Player Activity Work Flow", () => {

before(function() {
cy.visit(C.LEARN_PORTAL_BASE_URL); // Visit LEARN Portal home page
});
before(function() {
cy.visit(C.LEARN_PORTAL_BASE_URL); // Visit LEARN Portal home page
});

it("Edit portal settings to open activity in same browser tab", () => {
cy.login(C.ADMIN_USERNAME, C.ADMIN_PASSWORD);
adminHelper.disableOpenInNewWindow(ASSIGNMENT_NAME);
cy.logout();
});
function clearCookies() {
cy.clearAllCookies();
};

it("Verify teacher adds class, assignment and 5 students to class", () => {
cy.login(C.TEACHER1_USERNAME, C.TEACHER1_PASSWORD);
TeacherHelper.addClass(CLASS_NAME, CLASS_NAME, CLASS_WORD);
TeacherHelper.addAssignment(CLASS_NAME, ASSIGNMENT_NAME);
cy.logout();
});
it("Verify students can use the class word and add themselves to the class", () => {
STUDENTS.forEach(eachStudent => {
cy.login(C[eachStudent + '_USERNAME'], C[eachStudent + '_PASSWORD']);
joinClass(CLASS_WORD);
cy.logout();
});
it("Edit portal settings to open activity in same browser tab", () => {
cy.login(C.ADMIN_USERNAME, C.ADMIN_PASSWORD);
adminHelper.disableOpenInNewWindow(ASSIGNMENT_NAME);
cy.logout();
clearCookies();
});

it("Verify teacher adds class, assignment and 5 students to class", () => {
cy.login(C.TEACHER1_USERNAME, C.TEACHER1_PASSWORD);
TeacherHelper.addClass(CLASS_NAME, CLASS_NAME, CLASS_WORD);
TeacherHelper.addAssignment(CLASS_NAME, ASSIGNMENT_NAME);
cy.logout();
clearCookies();
});
it("Verify students can use the class word and add themselves to the class", () => {
STUDENTS.forEach(eachStudent => {
cy.login(C[eachStudent + '_USERNAME'], C[eachStudent + '_PASSWORD']);
joinClass(CLASS_WORD);
cy.logout();
clearCookies();
});
it("Verify Labbook Wide Interactive", () => {
let studentIndex = 0;
STUDENTS.forEach(eachStudent => {
let studentObj = {
firstName: C[eachStudent + '_FIRSTNAME'],
lastName: C[eachStudent + '_LASTNAME'],
username: C[eachStudent + '_USERNAME'],
password: C[eachStudent + '_PASSWORD'],
};
studentIndex++;
cy.login(studentObj.username, studentObj.password);
BTN_ACTIVITY_RUN(CLASS_WORD).click();
cy.wait(15000);
apRuntimeHelper.goToPageNumber(0);
cy.wait(5000);
labbookWideHelper.verifyInitialDisplay();
labbookWideHelper.verifyLabbokWideUrl();
apRuntimeHelper.goToPageNumber(1);
cy.wait(5000);
labbookWideHelper.verifyLabbokWideUpload();
apRuntimeHelper.goToPageNumber(2);
cy.wait(5000);
labbookWideHelper.verifyLabbokWideSnapshot();
});
});
it("Verify Labbook Wide Interactive", () => {
let studentIndex = 0;
STUDENTS.forEach(eachStudent => {
let studentObj = {
firstName: C[eachStudent + '_FIRSTNAME'],
lastName: C[eachStudent + '_LASTNAME'],
username: C[eachStudent + '_USERNAME'],
password: C[eachStudent + '_PASSWORD'],
};
studentIndex++;
cy.login(studentObj.username, studentObj.password);
BTN_ACTIVITY_RUN(CLASS_WORD).click();
cy.wait(15000);
apRuntimeHelper.goToPageNumber(0);
cy.wait(5000);
labbookWideHelper.verifyInitialDisplay();
labbookWideHelper.verifyLabbokWideUrl();
apRuntimeHelper.goToPageNumber(1);
cy.wait(5000);
labbookWideHelper.verifyLabbokWideUpload();
apRuntimeHelper.goToPageNumber(2);
cy.wait(5000);
labbookWideHelper.verifyLabbokWideSnapshot();
});
});

});
91 changes: 49 additions & 42 deletions cypress/e2e/end-end/automatedtestactivity_landofbump_ap_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,49 +19,56 @@ const STUDENTS = ["STUDENT3"];

context("Verify Student Acitivty Player Activity Work Flow", () => {

before(function() {
cy.visit(C.LEARN_PORTAL_BASE_URL); // Visit LEARN Portal home page
});
before(function() {
cy.visit(C.LEARN_PORTAL_BASE_URL); // Visit LEARN Portal home page
});

it("Edit portal settings to open activity in same browser tab", () => {
cy.login(C.ADMIN_USERNAME, C.ADMIN_PASSWORD);
adminHelper.disableOpenInNewWindow(ASSIGNMENT_NAME);
cy.logout();
});
function clearCookies() {
cy.clearAllCookies();
};

it("Verify teacher adds class, assignment and 5 students to class", () => {
cy.login(C.TEACHER1_USERNAME, C.TEACHER1_PASSWORD);
TeacherHelper.addClass(CLASS_NAME, CLASS_NAME, CLASS_WORD);
TeacherHelper.addAssignment(CLASS_NAME, ASSIGNMENT_NAME);
cy.logout();
});
it("Verify students can use the class word and add themselves to the class", () => {
STUDENTS.forEach(eachStudent => {
cy.login(C[eachStudent + '_USERNAME'], C[eachStudent + '_PASSWORD']);
joinClass(CLASS_WORD);
cy.logout();
});
})
it("Verify student play the video sequence", () => {
let studentIndex = 0;
STUDENTS.forEach(eachStudent => {
let studentObj = {
firstName: C[eachStudent + '_FIRSTNAME'],
lastName: C[eachStudent + '_LASTNAME'],
username: C[eachStudent + '_USERNAME'],
password: C[eachStudent + '_PASSWORD'],
};
studentIndex++;
cy.login(studentObj.username, studentObj.password);
BTN_ACTIVITY_RUN(CLASS_NAME).click();
cy.wait(15000);
let totalPagesInAssignment = assignment.assignmentPages.totalPages;
apRuntimeHelper.goToActivityHome(ASSIGNMENT_NAME);
for(let pageIndex = 1 ; pageIndex <= totalPagesInAssignment; pageIndex++){
apRuntimeHelper.goToPageNumber(pageIndex - 1);
landOfBumpRuntimeHelper.answerQuestionsInPage("Part"+pageIndex);
}
});
});
it("Edit portal settings to open activity in same browser tab", () => {
cy.login(C.ADMIN_USERNAME, C.ADMIN_PASSWORD);
adminHelper.disableOpenInNewWindow(ASSIGNMENT_NAME);
cy.logout();
clearCookies();
});

it("Verify teacher adds class, assignment and 5 students to class", () => {
cy.login(C.TEACHER1_USERNAME, C.TEACHER1_PASSWORD);
TeacherHelper.addClass(CLASS_NAME, CLASS_NAME, CLASS_WORD);
TeacherHelper.addAssignment(CLASS_NAME, ASSIGNMENT_NAME);
cy.logout();
clearCookies();
});
it("Verify students can use the class word and add themselves to the class", () => {
STUDENTS.forEach(eachStudent => {
cy.login(C[eachStudent + '_USERNAME'], C[eachStudent + '_PASSWORD']);
joinClass(CLASS_WORD);
cy.logout();
clearCookies();
});
})
it("Verify student play the video sequence", () => {
let studentIndex = 0;
STUDENTS.forEach(eachStudent => {
let studentObj = {
firstName: C[eachStudent + '_FIRSTNAME'],
lastName: C[eachStudent + '_LASTNAME'],
username: C[eachStudent + '_USERNAME'],
password: C[eachStudent + '_PASSWORD'],
};
studentIndex++;
cy.login(studentObj.username, studentObj.password);
BTN_ACTIVITY_RUN(CLASS_NAME).click();
cy.wait(15000);
let totalPagesInAssignment = assignment.assignmentPages.totalPages;
apRuntimeHelper.goToActivityHome(ASSIGNMENT_NAME);
for(let pageIndex = 1 ; pageIndex <= totalPagesInAssignment; pageIndex++){
apRuntimeHelper.goToPageNumber(pageIndex - 1);
landOfBumpRuntimeHelper.answerQuestionsInPage("Part"+pageIndex);
}
});
});

});
114 changes: 61 additions & 53 deletions cypress/e2e/end-end/automatedtestactivity_starnavigation_ap_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,60 +18,68 @@ const STUDENTS = ["STUDENT5"];

context("Verify Student Acitivty Player Activity Work Flow", () => {

before(function() {
cy.visit(C.LEARN_PORTAL_BASE_URL); // Visit LEARN Portal home page
});
before(function() {
cy.visit(C.LEARN_PORTAL_BASE_URL); // Visit LEARN Portal home page
});

it("Edit portal settings to open activity in same browser tab", () => {
cy.login(C.ADMIN_USERNAME, C.ADMIN_PASSWORD);
adminHelper.disableOpenInNewWindow(ASSIGNMENT_NAME);
cy.logout();
});
function clearCookies() {
cy.clearAllCookies();
};

it("Verify teacher adds class, assignment and 5 students to class", () => {
cy.login(C.TEACHER1_USERNAME, C.TEACHER1_PASSWORD);
TeacherHelper.addClass(CLASS_NAME, CLASS_NAME, CLASS_WORD);
TeacherHelper.addAssignment(CLASS_NAME, ASSIGNMENT_NAME);
cy.logout();
});
it("Verify students can use the class word and add themselves to the class", () => {
STUDENTS.forEach(eachStudent => {
cy.login(C[eachStudent + '_USERNAME'], C[eachStudent + '_PASSWORD']);
joinClass(CLASS_WORD);
cy.logout();
});
})
it("Verify star navigation simulation", () => {
let studentIndex = 0;
STUDENTS.forEach(eachStudent => {
let studentObj = {
firstName: C[eachStudent + '_FIRSTNAME'],
lastName: C[eachStudent + '_LASTNAME'],
username: C[eachStudent + '_USERNAME'],
password: C[eachStudent + '_PASSWORD'],
};
studentIndex++;
cy.login(studentObj.username, studentObj.password);
BTN_ACTIVITY_RUN(CLASS_WORD).click();
cy.wait(10000);
apRuntimeHelper.goToPageNumber(0);
cy.wait(25000); //Added more waiting time to get constellations and stars loaded
starNavigationHelper.verifyInitialDisplay();
starNavigationHelper.makeChangesWithoutRouteMap();
apRuntimeHelper.goToPageNumber(1);
cy.wait(25000); //Added more waiting time to get constellations and stars loaded
starNavigationHelper.makeChangesWithRouteMap();
apRuntimeHelper.goToPageNumber(0);
cy.wait(25000); //Added more waiting time to get constellations and stars loaded
starNavigationHelper.verifyStateSavingWithoutRouteMap();
apRuntimeHelper.goToPageNumber(1);
cy.wait(25000); //Added more waiting time to get constellations and stars loaded
starNavigationHelper.verifyStateSavingWithRouteMap();
starNavigationHelper.verifyResetRoute();
starNavigationHelper.verifyDeleteSnapshot();
cy.go("back");
cy.logout();
});
});
it("Edit portal settings to open activity in same browser tab", () => {
cy.login(C.ADMIN_USERNAME, C.ADMIN_PASSWORD);
adminHelper.disableOpenInNewWindow(ASSIGNMENT_NAME);
cy.logout();
clearCookies();
});

it("Verify teacher adds class, assignment and 5 students to class", () => {
cy.login(C.TEACHER1_USERNAME, C.TEACHER1_PASSWORD);
TeacherHelper.addClass(CLASS_NAME, CLASS_NAME, CLASS_WORD);
TeacherHelper.addAssignment(CLASS_NAME, ASSIGNMENT_NAME);
cy.logout();
clearCookies();
});
it("Verify students can use the class word and add themselves to the class", () => {
STUDENTS.forEach(eachStudent => {
cy.login(C[eachStudent + '_USERNAME'], C[eachStudent + '_PASSWORD']);
joinClass(CLASS_WORD);
cy.logout();
clearCookies();
});
})
it("Verify star navigation simulation", () => {
let studentIndex = 0;
STUDENTS.forEach(eachStudent => {
let studentObj = {
firstName: C[eachStudent + '_FIRSTNAME'],
lastName: C[eachStudent + '_LASTNAME'],
username: C[eachStudent + '_USERNAME'],
password: C[eachStudent + '_PASSWORD'],
};
studentIndex++;
cy.login(studentObj.username, studentObj.password);
BTN_ACTIVITY_RUN(CLASS_WORD).click();
cy.wait(10000);
apRuntimeHelper.goToPageNumber(0);
cy.wait(25000); //Added more waiting time to get constellations and stars loaded
starNavigationHelper.verifyInitialDisplay();
starNavigationHelper.makeChangesWithoutRouteMap();
apRuntimeHelper.goToPageNumber(1);
cy.wait(25000); //Added more waiting time to get constellations and stars loaded
starNavigationHelper.makeChangesWithRouteMap();
apRuntimeHelper.goToPageNumber(0);
cy.wait(25000); //Added more waiting time to get constellations and stars loaded
starNavigationHelper.verifyStateSavingWithoutRouteMap();
apRuntimeHelper.goToPageNumber(1);
cy.wait(25000); //Added more waiting time to get constellations and stars loaded
starNavigationHelper.verifyStateSavingWithRouteMap();
starNavigationHelper.verifyResetRoute();
starNavigationHelper.verifyDeleteSnapshot();
cy.go("back");
cy.logout();
clearCookies();
});
});

});
Loading
Loading