Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
e144a60
Add support elements for Linked Data Editor settings management test …
zepheiryan Mar 6, 2026
55b7241
Add mechanisms to adjust for Cypress-specific DnDKit overlay renderin…
zepheiryan Mar 9, 2026
e4d8faf
Clear data between tests, continue trying to make building blocks con…
zepheiryan Mar 10, 2026
307d80e
Resolve consistency issues by waiting for overlay to be removed befor…
zepheiryan Mar 12, 2026
152248e
Test that changes in profile settings are applied to the resource editor
zepheiryan Mar 17, 2026
affdb92
Merge remote-tracking branch 'origin/master' into UILD-742
zepheiryan Mar 17, 2026
b3dac0b
Merge branch 'master' into UILD-742
zepheiryan Mar 17, 2026
930a1c2
Address Lint issues
zepheiryan Mar 18, 2026
5696ef4
Merge remote-tracking branch 'origin/UILD-742' into UILD-742
zepheiryan Mar 18, 2026
f9f211a
Merge remote-tracking branch 'origin/master' into UILD-742
zepheiryan Mar 18, 2026
5a30e59
Continue addressing lint issues
zepheiryan Mar 18, 2026
adf78f2
Continue addressing lint issues
zepheiryan Mar 18, 2026
f129051
Adjust to modified structural tags
zepheiryan Mar 20, 2026
a0d357d
Update to match brand change
zepheiryan Apr 25, 2026
22b3941
Update selectors to latest layout structure, add some waits. Remove c…
zepheiryan Apr 25, 2026
249386f
Remove comments, should no longer be an obstacle; add waits after pro…
zepheiryan Apr 25, 2026
b91aab9
Merging
zepheiryan Apr 25, 2026
7bdc1e5
Update to Marigold
zepheiryan Apr 25, 2026
c177220
Update from div to dialog
zepheiryan Apr 28, 2026
c0692cf
Switch from LDE to Marigold, working test
zepheiryan Apr 28, 2026
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
381 changes: 381 additions & 0 deletions cypress/e2e/linked-data/manage-profile-settings/drag-drop.cy.js

Large diffs are not rendered by default.

64 changes: 58 additions & 6 deletions cypress/support/api/linkedDataEditor.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,64 @@
Cypress.Commands.add('setPrefferedProfileForUser', () => {
// id is hardcoded as 3 on purpose - API will automatically identify the user ID from the folioAccessToken cookie.
const prefferedProfile = {
id: 3,
resourceType: 'http://bibfra.me/vocab/lite/Instance',
// For *ForUser commands, the API will automatically identify the
// user ID from the folioAccessToken cookie.

Cypress.Commands.add('getProfileMetadataByResourceType', (resourceTypeURL) => {
return cy.okapiRequest({
method: 'GET',
path: `linked-data/profile/metadata?resourceType=${resourceTypeURL}`,
isDefaultSearchParamsRequired: false,
}).then((response) => response.body);
});

Cypress.Commands.add('getAllPreferredProfilesForUser', () => {
return cy.okapiRequest({
method: 'GET',
path: 'linked-data/profile/preferred',
isDefaultSearchParamsRequired: false,
}).then((response) => response.body);
});

Cypress.Commands.add('getPreferredProfileForUser', (resourceTypeURL) => {
return cy.okapiRequest({
method: 'GET',
path: `linked-data/profile/preferred?resourceType=${resourceTypeURL}`,
isDefaultSearchParamsRequired: false,
}).then((response) => response.body);
});

Cypress.Commands.add('setPreferredProfileForUser', (id, resourceTypeURL) => {
const preferredProfile = {
id,
resourceType: resourceTypeURL,
};
cy.okapiRequest({
method: 'POST',
path: 'linked-data/profile/preferred',
body: prefferedProfile,
body: preferredProfile,
isDefaultSearchParamsRequired: false,
});
});

Cypress.Commands.add('deletePreferredProfileForUser', (resourceTypeURL) => {
cy.okapiRequest({
method: 'DELETE',
path: `linked-data/profile/preferred?resourceType=${resourceTypeURL}`,
isDefaultSearchParamsRequired: false,
});
});

Cypress.Commands.add('getProfileSettingsForUser', (id) => {
return cy.okapiRequest({
method: 'GET',
path: `linked-data/profile/settings/${id}`,
isDefaultSearchParamsRequired: false,
}).then((response) => response.body);
});

Cypress.Commands.add('setProfileSettingsForUser', (id, settings) => {
cy.okapiRequest({
method: 'POST',
path: `linked-data/profile/settings/${id}`,
body: JSON.stringify(settings),
isDefaultSearchParamsRequired: false,
});
});
5 changes: 5 additions & 0 deletions cypress/support/dictionary/permissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1516,6 +1516,11 @@ export default {
internal: 'ui-users.settings.departments.all',
gui: 'Settings (Users): Can create, edit, view, and delete departments',
},
// Linked Data Editor
linkedDataDeletePreferredProfile: {
internal: 'linked-data.profiles.preferred.delete',
gui: 'Linked Data: Delete the preferred profile for a resource type for the current user',
},

ebsconetAll: {
internal: 'ebsconet.all',
Expand Down
1 change: 1 addition & 0 deletions cypress/support/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import './inventory';
import './users';
import 'cypress-file-upload';
import 'cypress-recurse/commands';
import 'cypress-real-events/support';
import './commands';

registerCypressGrep();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Button, TextInput } from '../../../../interactors';

const MARCAuthorityModal = "//div[@data-testid='modal']";
const MARCAuthorityModal = "//dialog[@data-testid='modal']";
const searchOption = Button({ dataTestID: 'id-search-segment-button-authorities:search' });
const searchInput = TextInput({ id: 'id-search-textarea' });
const searchButton = Button({ dataTestID: 'id-search-button' });
Expand Down
4 changes: 2 additions & 2 deletions cypress/support/fragments/linked-data/closeResourceModal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const closeResourceModal =
"//div[@data-testid='modal']//h3[@class='title' and text()='Close resource']";
const closeResourceModalByTestId = "//div[@data-testid='modal']";
"//dialog[@data-testid='modal']//h3[@class='title' and text()='Close resource']";
const closeResourceModalByTestId = "//dialog[@data-testid='modal']";
const modalContent = "//div[@data-testid='modal-close-record-content']";
const closeButton = "//button[@class='close-button']";
const yesButton = "//button[@data-testid='modal-button-cancel']";
Expand Down
12 changes: 12 additions & 0 deletions cypress/support/fragments/linked-data/editResource.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,18 @@ export default {
.should('be.visible');
},

checkSectionIsNotVisible(section) {
cy.xpath(`//div[@id="${section}"]`).should('not.be.visible');
},

// 1-indexed
checkSectionInPosition(section, position) {
cy.xpath('//div[@id="edit-section"]/div[contains(@class,"edit-section-group")]/div[1]/div[1]')
.eq(position - 1)
.invoke('attr', 'id')
.should('eq', section);
},

clickCloseResourceButton() {
cy.do(Button({ dataTestID: 'nav-close-button' }).click());
cy.wait(500);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const instanceProfileModal = 'div[class="modal modal-choose-profile"]';
const instanceProfileModal = 'dialog[class="modal modal-choose-profile"]';

export default {
waitLoading() {
Expand Down
Loading