Skip to content

Commit

Permalink
Merge pull request #3199 from 4Science/task/main/CST-15593
Browse files Browse the repository at this point in the history
[#2718] Migrate cookie consent from Klaro to Orejime
  • Loading branch information
tdonohue authored Nov 8, 2024
2 parents 2c7e30c + 5bd99a1 commit e4cdd73
Show file tree
Hide file tree
Showing 51 changed files with 599 additions and 643 deletions.
12 changes: 6 additions & 6 deletions cypress/e2e/admin-add-new-modals.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ describe('Admin Add New Modals', () => {

it('Add new Community modal should pass accessibility tests', () => {
// Pin the sidebar open
cy.get('#sidebar-collapse-toggle').click();
cy.get('[data-test="sidebar-collapse-toggle"]').click();

// Click on entry of menu
cy.get('#admin-menu-section-new-title').click();
cy.get('[data-test="admin-menu-section-new-title"]').click();

cy.get('a[data-test="menu.section.new_community"]').click();

Expand All @@ -22,10 +22,10 @@ describe('Admin Add New Modals', () => {

it('Add new Collection modal should pass accessibility tests', () => {
// Pin the sidebar open
cy.get('#sidebar-collapse-toggle').click();
cy.get('[data-test="sidebar-collapse-toggle"]').click();

// Click on entry of menu
cy.get('#admin-menu-section-new-title').click();
cy.get('[data-test="admin-menu-section-new-title"]').click();

cy.get('a[data-test="menu.section.new_collection"]').click();

Expand All @@ -35,10 +35,10 @@ describe('Admin Add New Modals', () => {

it('Add new Item modal should pass accessibility tests', () => {
// Pin the sidebar open
cy.get('#sidebar-collapse-toggle').click();
cy.get('[data-test="sidebar-collapse-toggle"]').click();

// Click on entry of menu
cy.get('#admin-menu-section-new-title').click();
cy.get('[data-test="admin-menu-section-new-title"]').click();

cy.get('a[data-test="menu.section.new_item"]').click();

Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/admin-edit-modals.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('Admin Edit Modals', () => {

it('Edit Community modal should pass accessibility tests', () => {
// Pin the sidebar open
cy.get('#sidebar-collapse-toggle').click();
cy.get('[data-test="sidebar-collapse-toggle"]').click();

// Click on entry of menu
cy.get('#admin-menu-section-edit-title').click();
Expand All @@ -22,7 +22,7 @@ describe('Admin Edit Modals', () => {

it('Edit Collection modal should pass accessibility tests', () => {
// Pin the sidebar open
cy.get('#sidebar-collapse-toggle').click();
cy.get('[data-test="sidebar-collapse-toggle"]').click();

// Click on entry of menu
cy.get('#admin-menu-section-edit-title').click();
Expand All @@ -35,7 +35,7 @@ describe('Admin Edit Modals', () => {

it('Edit Item modal should pass accessibility tests', () => {
// Pin the sidebar open
cy.get('#sidebar-collapse-toggle').click();
cy.get('[data-test="sidebar-collapse-toggle"]').click();

// Click on entry of menu
cy.get('#admin-menu-section-edit-title').click();
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/admin-export-modals.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('Admin Export Modals', () => {

it('Export metadata modal should pass accessibility tests', () => {
// Pin the sidebar open
cy.get('#sidebar-collapse-toggle').click();
cy.get('[data-test="sidebar-collapse-toggle"]').click();

// Click on entry of menu
cy.get('#admin-menu-section-export-title').click();
Expand All @@ -22,7 +22,7 @@ describe('Admin Export Modals', () => {

it('Export batch modal should pass accessibility tests', () => {
// Pin the sidebar open
cy.get('#sidebar-collapse-toggle').click();
cy.get('[data-test="sidebar-collapse-toggle"]').click();

// Click on entry of menu
cy.get('#admin-menu-section-export-title').click();
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/admin-sidebar.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('Admin Sidebar', () => {

it('should be pinnable and pass accessibility tests', () => {
// Pin the sidebar open
cy.get('#sidebar-collapse-toggle').click();
cy.get('[data-test="sidebar-collapse-toggle"]').click();

// Click on every expandable section to open all menus
cy.get('ds-expandable-admin-sidebar-section').click({ multiple: true });
Expand Down
4 changes: 2 additions & 2 deletions cypress/support/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ before(() => {

// Runs once before the first test in each "block"
beforeEach(() => {
// Pre-agree to all Klaro cookies by setting the klaro-anonymous cookie
// Pre-agree to all Orejime cookies by setting the orejime-anonymous cookie
// This just ensures it doesn't get in the way of matching other objects in the page.
cy.setCookie('klaro-anonymous', '{%22authentication%22:true%2C%22preferences%22:true%2C%22acknowledgement%22:true%2C%22google-analytics%22:true%2C%22google-recaptcha%22:true}');
cy.setCookie('orejime-anonymous', '{"authentication":true,"preferences":true,"acknowledgement":true,"google-analytics":true}');

// Remove any CSRF cookies saved from prior tests
cy.clearCookie(DSPACE_XSRF_COOKIE);
Expand Down
Loading

0 comments on commit e4cdd73

Please sign in to comment.