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

Primevue Update #720

Merged
merged 36 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b893f1c
updating primevue primeflex and primeicons
Emily-ejag Jul 22, 2024
193f1a2
adding new components and update others
Emily-ejag Jul 23, 2024
a676025
Style Manage Tasks and Variants
Emily-ejag Jul 23, 2024
4c4cb1e
rebase to main
Emily-ejag Jul 23, 2024
6c11797
going back on RoarDataTable
Emily-ejag Jul 23, 2024
1757271
merge to main
Emily-ejag Jul 25, 2024
4dfea65
merging to main
Emily-ejag Jul 25, 2024
6b229ea
finishing admin dashboard
Emily-ejag Jul 26, 2024
9126ddd
run lint
Emily-ejag Jul 26, 2024
d0ca93b
fixing log in and home participant
Emily-ejag Jul 26, 2024
ce47d34
tabview fix
Emily-ejag Jul 27, 2024
70b1078
taking out negative margin
Emily-ejag Jul 27, 2024
790d0eb
fixing routing
Emily-ejag Jul 29, 2024
626a7a4
Merge branch 'main' of https://github.com/yeatmanlab/roar-dashboard i…
Emily-ejag Jul 29, 2024
36cede0
cypress tests on testScoreReportFiltering
Emily-ejag Jul 29, 2024
2d64625
fixing cypress testProgressReportFiltering
Emily-ejag Jul 29, 2024
405e796
fixing participant test
Emily-ejag Jul 29, 2024
ca33ef7
fixing cypress tests
Emily-ejag Jul 29, 2024
85ca326
fixing playVideo test
Emily-ejag Jul 29, 2024
1fd3f02
changing dropdown to select and tabview to tabs
Emily-ejag Jul 30, 2024
e1a27f5
fixing home participant css
Emily-ejag Jul 30, 2024
02334fc
Merge branch 'main' into enh/primeview-update
Emily-ejag Jul 30, 2024
26272c4
updating primevue components
Emily-ejag Jul 30, 2024
ba16cbb
fixing ListOrgs
Emily-ejag Jul 31, 2024
b2f4924
Merge branch 'main' of https://github.com/yeatmanlab/roar-dashboard i…
Emily-ejag Aug 12, 2024
e95d70a
changes for dark mode
Emily-ejag Aug 13, 2024
52bceeb
Merge branch 'main' of https://github.com/yeatmanlab/roar-dashboard i…
Emily-ejag Aug 13, 2024
642e37e
dark mode modifications
Emily-ejag Aug 13, 2024
251e4f5
finishing darkmode primitive color changes
Emily-ejag Aug 14, 2024
aaa6d30
Fixing cypress tests
Emily-ejag Aug 14, 2024
7a4a697
firebase functions
Emily-ejag Aug 15, 2024
0bfea75
Merge branch 'main' of https://github.com/yeatmanlab/roar-dashboard i…
Emily-ejag Aug 15, 2024
a413705
enforcing light mode
Emily-ejag Aug 15, 2024
9aa3d69
solving responsive issues
Emily-ejag Aug 16, 2024
72fd83a
Merge branch 'main' of https://github.com/yeatmanlab/roar-dashboard i…
Emily-ejag Aug 16, 2024
59679ba
fixing tabs on score report
Emily-ejag Aug 16, 2024
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
5 changes: 3 additions & 2 deletions cypress/e2e/participant/default-tests/checkLegalDoc.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ describe('Test to maintain that assent form shows in when signing in with an un-
// how can we write some logic to reset the already played
cy.login(test_login, test_pw);
cy.visit('/');
cy.get('.p-dialog-title', { timeout: timeout }).contains('CONSENT').should('be.visible');
cy.get('.p-confirm-dialog-accept').contains('Continue').should('be.visible');
cy.wait(1000);
cy.get('.p-dialog-title', { timeout: timeout }).contains('CONSENT FORM').should('be.visible');
cy.get('.p-dialog-footer').contains('Continue').should('be.visible');
});
});
2 changes: 1 addition & 1 deletion cypress/e2e/participant/default-tests/playVideo.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ describe('Playing Video', () => {
cy.login(Cypress.env('participantUsername'), Cypress.env('participantPassword'));
cy.visit('/', { timeout: 2 * timeout });
cy.selectAdministration(Cypress.env('testRoarAppsAdministration'));
cy.get('.tabview-nav-link-label', { timeout: 2 * timeout })
cy.get('.p-tablist-tab-list', { timeout: 2 * timeout })
.contains('ROAR - Word')
.click();
cy.get('.vjs-big-play-button', { timeout: 2 * timeout }).click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('The partner admin can select and export progress reports for a given a
cy.get('button').contains('Progress').first().click();

// make a selection
cy.get('.p-checkbox-box').first().click();
cy.get('input.p-checkbox-input').first().click();

cy.get('button').contains('Export Selected').click();
cy.readFile(`${Cypress.env('cypressDownloads')}/roar-progress-selected.csv`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('The partner admin can select and export progress reports for a given a
cy.get('button').contains('Score').first().click();

// make a selection
cy.get('.p-checkbox-box').first().click();
cy.get('input.p-checkbox-input').first().click();

cy.get('button').contains('Export Selected').click();
cy.readFile(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const orgs = [
const listOrgsUrl = '/list-orgs';

function checkOrgExists(org) {
cy.get('ul > li', { timeout: timeout }).contains(org.tabName, { timeout: timeout }).click();
cy.get('.p-tablist-tab-list', { timeout: timeout }).contains(org.tabName, { timeout: timeout }).click();
cy.log('Tab ' + org.tabName + ' found.');

cy.get('div', { timeout: timeout }).should('contain.text', org.orgName, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,14 @@ function setFilterByGrade(grade) {
}

function setFilterByProgressCategory(header, category) {
cy.contains('div.p-column-header-content', header).find('button').click();
cy.contains(
'th.p-datatable-header-cell.p-datatable-sortable-column.p-datatable-resizable-column.p-datatable-reorderable-column',
header,
)
.find('button')
.click();
cy.get('[data-cy="progress-filter-dropdown"]', { timeout: timeout }).click();
cy.get('ul>li').find('.p-tag-value', { timeout: timeout }).contains(category).click();
cy.get('ul>li').find('span.p-tag-label', { timeout: timeout }).contains(category).click();
// Click off the dropdown to prevent it from hiding other elements
cy.get('button').contains('Apply').click();
cy.wait(0.05 * timeout);
Expand Down Expand Up @@ -148,7 +153,7 @@ describe('The partner admin can view progress reports for a given administration
cy.getAdministrationCard(roarTestAdministrationName, 'descending');
clickProgressButton(roarTestAdministrationId);
setFilterByProgressCategory('ROAR - Written Vocab', 'started');
cy.get('.p-datatable-emptymessage').contains('No results found');
cy.get('.p-datatable-emptymessage').contains('Reset Filters');
cy.get('.flex.flex-column.align-items-center.align-text-left.my-8').contains('No results found');
cy.get('.flex.flex-column.align-items-center.align-text-left.my-8').contains('Reset Filters');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,25 @@ function setFilterByGrade(grade) {
}

function setFilterByProgressCategory(header, category) {
cy.contains('div.p-column-header-content', header).find('button').click();
cy.contains(
'th.p-datatable-header-cell.p-datatable-sortable-column.p-datatable-resizable-column.p-datatable-reorderable-column',
header,
)
.find('button')
.click();
cy.get('[data-cy="score-filter-dropdown"]', { timeout: timeout }).click();
cy.get('ul>li').find('.p-tag-value', { timeout: timeout }).contains(category).click();
cy.get('ul>li').find('span.p-tag-label', { timeout: timeout }).contains(category).click();
cy.get('button').contains('Apply').click();
cy.wait(0.05 * timeout);
}

function setFilterByScoreCategory(header, category) {
cy.contains('div.p-column-header-content', header).find('button').click();
cy.contains(
'th.p-datatable-header-cell.p-datatable-sortable-column.p-datatable-resizable-column.p-datatable-reorderable-column',
header,
)
.find('button')
.click();
cy.get('[data-cy="score-filter-dropdown"]', { timeout: timeout }).click();
cy.get('ul > li', { timeout: timeout }).contains(category).click();
cy.get('button').contains('Apply').click();
Expand Down Expand Up @@ -134,7 +144,7 @@ describe('The partner admin can view score reports for a given administration an
cy.getAdministrationCard(roarTestAdministrationName, 'descending');
clickScoreButton(roarTestAdministrationId);
setFilterByScoreCategory('ROAR - Written Vocab', 'Optional');
cy.get('.p-datatable-emptymessage').contains('No results found');
cy.get('.p-datatable-emptymessage').contains('Reset Filters');
cy.get('.flex.flex-column.align-items-center.align-text-left.my-8').contains('No results found');
cy.get('.flex.flex-column.align-items-center.align-text-left.my-8').contains('Reset Filters');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,6 @@ function clickScoreButton() {
);
}

function checkAssignmentColumns(assignments) {
cy.get('[data-cy="roar-data-table"] thead th').then(($header) => {
const tableHeaders = $header.map((index, elem) => Cypress.$(elem).text()).get();

assignments.forEach((assignment) => {
expect(tableHeaders).to.include(assignment);
});
});
}

function checkIndividualScoreReport() {
cy.get('[data-cy="route-button"]', { timeout: 3 * timeout })
.first()
Expand All @@ -50,7 +40,6 @@ describe('The partner admin can view individual score reports for a given admini
cy.getAdministrationCard(testPartnerAdministrationName);
clickScoreButton();
cy.checkUserList(testUserList);
checkAssignmentColumns(testAssignments);
checkIndividualScoreReport();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ function clickProgressButton() {
}

function checkProgressTags(headers) {
cy.get('[data-cy="roar-data-table"] thead th').then(($header) => {
const tableHeaders = $header.map((index, elem) => Cypress.$(elem).text()).get();
cy.get('.p-datatable-column-header-content').then(($header) => {
const tableHeaders = Array.from($header).map((elem) => elem.innerText.trim());
cy.log('Table Headers:', tableHeaders);

headers.forEach((header) => {
const headerIndex = tableHeaders.indexOf(header);
Expand All @@ -38,6 +39,8 @@ function checkProgressTags(headers) {
cy.wrap(headerCell).find('span.p-tag.p-component').should('exist');
});
});
} else {
cy.log(`Header "${header}" not found in table headers.`);
}
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ function clickScoreButton() {
}

function checkAssignmentColumns() {
cy.get('[data-cy="roar-data-table"] thead th').then(($header) => {
const tableHeaders = $header.map((index, elem) => Cypress.$(elem).text()).get();
cy.get('.p-datatable-column-header-content').then(($header) => {
const tableHeaders = Array.from($header).map((header) => header.innerText);
cy.log('Table Headers:', tableHeaders);

testAssignments.forEach((assignment) => {
expect(tableHeaders).to.include(assignment);
expect(tableHeaders).to.include(assignment, `Expected header to include ${assignment}`);
});
});
}
Expand Down
4 changes: 2 additions & 2 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Cypress.Commands.add('selectAdministration', function selectAdministration(testA
cy.agreeToConsent(text);

if (text.includes(testAdministration)) {
cy.get('.p-dropdown-item', { timeout: 2 * Cypress.env('timeout') })
cy.get('.p-select-list-container', { timeout: 2 * Cypress.env('timeout') })
.contains(testAdministration)
.click();
cy.log('Selected administration:', testAdministration);
Expand Down Expand Up @@ -185,7 +185,7 @@ Cypress.Commands.add(
Cypress.Commands.add('checkUserList', (userList) => {
cy.get('[data-cy="roar-data-table"] tbody tr', { timeout: Cypress.env('timeout') }).each((row) => {
cy.wrap(row)
.find('td.p-frozen-column')
.find('td.p-datatable-frozen-column')
.then((cell) => {
// The following cleans the non-breaking space character and any whitespace from the cell text
const cellText = cell
Expand Down
Loading
Loading