Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4568607
feat: add ProfileInfo component and enhance AccountActionButton with …
Oct 2, 2025
5d3f718
Merge branch 'develop' into SWAP-4997-move-user-info-under-profile-su…
jekabs-karklins Oct 2, 2025
f61a11d
fix: update personal information test to use new account management b…
Oct 3, 2025
96ffc13
Merge branch 'develop' into SWAP-4997-move-user-info-under-profile-su…
jekabs-karklins Oct 3, 2025
18f2d79
Merge branch 'develop' into SWAP-4997-move-user-info-under-profile-su…
jekabs-karklins Oct 6, 2025
bc70eca
fix: update invite test to use data attribute for chip existence check
Oct 12, 2025
718171d
Merge branch 'SWAP-4997-move-user-info-under-profile-submenu' of gith…
Oct 12, 2025
8b575b4
fix: update invite test to check for non-existence of invites chips
Oct 12, 2025
c7771fa
Merge branch 'develop' into SWAP-4997-move-user-info-under-profile-su…
jekabs-karklins Oct 12, 2025
22e0a7f
Merge branch 'develop' into SWAP-4997-move-user-info-under-profile-su…
yoganandaness Oct 15, 2025
39a6b9d
Merge branch 'develop' into SWAP-4997-move-user-info-under-profile-su…
yoganandaness Oct 15, 2025
2b30860
fix: optimised the element find fixing the issue
yoganandaness Oct 15, 2025
13e1c29
fix: exp safety download button refresh fixed by using request polling
yoganandaness Oct 16, 2025
7e19841
Merge branch 'develop' into SWAP-4928-user-office-experiment-safety-d…
yoganandaness Oct 16, 2025
243de84
Merge branch 'develop' into SWAP-4928-user-office-experiment-safety-d…
yoganandaness Oct 17, 2025
021e004
Merge branch 'develop' into SWAP-4928-user-office-experiment-safety-d…
yoganandaness Oct 27, 2025
af45d4a
Merge branch 'develop' into SWAP-4928-user-office-experiment-safety-d…
jekabs-karklins Oct 28, 2025
c3b4158
Merge branch 'develop' into SWAP-4928-user-office-experiment-safety-d…
yoganandaness Oct 28, 2025
8ac69a2
Merge branch 'develop' into SWAP-4928-user-office-experiment-safety-d…
yoganandaness Oct 30, 2025
a944e78
Merge branch 'develop' into SWAP-4928-user-office-experiment-safety-d…
yoganandaness Oct 30, 2025
dc0e469
chore: automation of syncing open non dependabot PRs with develop branch
yoganandaness Nov 4, 2025
565594e
Chore/pr auto dev sync (#1250)
yoganandaness Nov 4, 2025
c95002d
test
yoganandaness Nov 4, 2025
64164cb
Merge branch 'develop1' of github.com:UserOfficeProject/user-office-c…
yoganandaness Nov 4, 2025
761db06
Merge branch 'develop' into SWAP-4928-user-office-experiment-safety-d…
yoganandaness Nov 4, 2025
eb3e69a
Merge branch 'develop' into SWAP-4928-user-office-experiment-safety-d…
yoganandaness Nov 5, 2025
3d105df
Merge branch 'develop' into SWAP-4928-user-office-experiment-safety-d…
yoganandaness Nov 5, 2025
a34e54e
Merge branch 'SWAP-4928-user-office-experiment-safety-document-disabl…
yoganandaness Nov 15, 2025
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
40 changes: 40 additions & 0 deletions .github/workflows/sync-prs-with-develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Sync PRs with develop

on:
push:
branches:
- develop1

jobs:
sync-prs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Rebase all open non-Dependabots PRs with develop branch as base
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Get all open PRs targeting develop, excluding Dependabot
prs=$(gh pr list --state open --base develop1 --limit 100 --json number,author --jq '.[] | select(.author.is_bot != true) | .number')

for pr in $prs; do
echo "Processing PR #$pr"
gh pr checkout $pr
git fetch origin develop1

# Attempt rebase
if git rebase origin/develop1; then
echo "PR #$pr rebased successfully. Pushing changes..."
git push --force-with-lease
else
echo "Conflict in PR #$pr. Rebase aborted."
git rebase --abort
# Optional: Notify author
gh pr comment $pr --body "⚠️ Automatic rebase failed due to conflicts. Please rebase manually."
fi
done
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ BEGIN




END;
END IF;
END;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
DO
$$
DECLARE
default_experiment_safety_review_template int;
experiment_safety_review_template_group_id text;
BEGIN
IF register_patch('ActivateDefaultExperimentSafetyReviewTemplate.sql', 'Yoganandan Pandiyan', 'Activate default Experiment Safety Review template', '2025-10-16') THEN
SELECT templates.template_id, templates.group_id
INTO default_experiment_safety_review_template, experiment_safety_review_template_group_id
FROM templates
WHERE name='default experiment safety review template';

INSERT INTO active_templates (template_id, group_id) VALUES (default_experiment_safety_review_template, experiment_safety_review_template_group_id);
END IF;
END;
$$
LANGUAGE plpgsql;
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ BEGIN
, comment_for_user
, notified
, submitted
, management_decision_submitted
)
VALUES
(
Expand All @@ -83,7 +84,8 @@ BEGIN
, NULL
, NULL
, true
, true
, true
, true
);

INSERT INTO instrument_has_proposals(instrument_id, proposal_pk) VALUES (1, 1);
Expand All @@ -107,6 +109,7 @@ BEGIN
, comment_for_user
, notified
, submitted
, management_decision_submitted
)
VALUES
(
Expand All @@ -123,7 +126,8 @@ BEGIN
, NULL
, NULL
, true
, true
, true
, true
);

INSERT INTO instrument_has_proposals(instrument_id, proposal_pk) VALUES (2, 2);
Expand Down
79 changes: 16 additions & 63 deletions apps/e2e/cypress/e2e/experimentSafetyReview.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,37 +339,6 @@ function createWorkflowForESR() {
});
}

// Helper function to approve proposal
function approveProposal() {
cy.login('officer');
cy.visit('/');
cy.contains(TEST_CONSTANTS.UI_LABELS.PROPOSALS).click();
cy.get('[data-cy=view-proposal]').first().click();
cy.finishedLoading();
cy.get('[role="dialog"]').contains(TEST_CONSTANTS.UI_LABELS.ADMIN).click();
cy.get('[data-cy="proposal-final-status"]').should('exist');
cy.get('[role="dialog"]').contains(TEST_CONSTANTS.UI_LABELS.ADMIN).click();
cy.get('[data-cy="proposal-final-status"]').click();
cy.get('li[data-cy="proposal-final-status-options"]')
.contains(TEST_CONSTANTS.FORM_VALUES.PROPOSAL_STATUS)
.click();
cy.get(
`[data-cy="managementTimeAllocation-${initialDBData.instrument1.id}"] input`
)
.clear()
.type(TEST_CONSTANTS.FORM_VALUES.MANAGEMENT_TIME);
cy.get('[data-cy="is-management-decision-submitted"]').click();
cy.get('[data-cy="save-admin-decision"]').click();
cy.notification({ variant: 'success', text: 'Saved' });
cy.reload();
cy.get('[data-cy="is-management-decision-submitted"] input').should(
'have.value',
'true'
);
cy.closeModal();
cy.contains(TEST_CONSTANTS.FORM_VALUES.PROPOSAL_STATUS);
}

// Helper function to submit ESF by user
function submitESFByUser() {
cy.login('user1');
Expand Down Expand Up @@ -560,9 +529,6 @@ context('Experiment Safety Review tests', () => {
templateGroupId: TemplateGroupId.EXPERIMENT_SAFETY_REVIEW,
templateId: initialDBData.experimentSafetyReviewTemplate.id,
});

// Approve proposal for all tests
approveProposal();
});

describe('User Experiment Safety Form Submission', () => {
Expand Down Expand Up @@ -749,13 +715,10 @@ context('Experiment Safety Review tests', () => {
cy.get('[data-cy="button-submit-experiment-safety-review"]').click();
cy.contains(TEST_CONSTANTS.UI_LABELS.OK).click();

// Refresh the page to get the updated status after workflow processing
cy.reload();

// Download button should now be enabled (IS approval enables download in IS workflow)
cy.contains(TEST_CONSTANTS.UI_LABELS.DOWNLOAD_SAFETY_DOCUMENT).should(
'not.be.disabled'
);
// Wait for the workflow processing to complete by checking the download button state
cy.contains(TEST_CONSTANTS.UI_LABELS.DOWNLOAD_SAFETY_DOCUMENT, {
timeout: 6000,
}).should('not.be.disabled');
});

it('Should not enable download button when Instrument Scientist rejects (IS workflow)', () => {
Expand Down Expand Up @@ -865,9 +828,6 @@ context('Experiment Safety Review tests', () => {
templateGroupId: TemplateGroupId.EXPERIMENT_SAFETY_REVIEW,
templateId: initialDBData.experimentSafetyReviewTemplate.id,
});

// Approve proposal for all tests
approveProposal();
});

describe('User Experiment Safety Form Submission', () => {
Expand Down Expand Up @@ -933,13 +893,10 @@ context('Experiment Safety Review tests', () => {
cy.get('[data-cy="button-submit-experiment-safety-review"]').click();
cy.contains('OK').click();

// Refresh the page to get the updated status after workflow processing
cy.reload();

// Download button should now be enabled (ESR approval enables download in ESR workflow)
cy.contains('Download Safety Review Document').should(
'not.be.disabled'
);
// Wait for the workflow processing to complete by checking the download button state
cy.contains('Download Safety Review Document', {
timeout: 6000,
}).should('not.be.disabled');
});

it('Should not enable download button when Experiment Safety Reviewer rejects (ESR workflow)', () => {
Expand Down Expand Up @@ -1033,11 +990,10 @@ context('Experiment Safety Review tests', () => {
cy.get('[data-cy="button-submit-experiment-safety-review"]').click();
cy.contains('OK').click();

// Refresh the page to get the updated status after workflow processing
cy.reload();

// Download button should remain disabled (IS approval doesn't enable download in ESR workflow)
cy.contains('Download Safety Review Document').should('be.disabled');
// Wait for the workflow processing to complete, then check that download button remains disabled
cy.contains('Download Safety Review Document', {
timeout: 6000,
}).should('be.disabled');

// Status should remain the same (not changed to approved)
cy.get('[data-cy="close-modal"]').click();
Expand Down Expand Up @@ -1109,13 +1065,10 @@ context('Experiment Safety Review tests', () => {
cy.get('[data-cy="button-submit-experiment-safety-review"]').click();
cy.contains('OK').click();

// Refresh the page to get the updated status after workflow processing
cy.reload();

// Now download should be enabled and status should change
cy.contains('Download Safety Review Document').should(
'not.be.disabled'
);
// Wait for the workflow processing to complete by checking the download button state
cy.contains('Download Safety Review Document', {
timeout: 6000,
}).should('not.be.disabled');
cy.get('[data-cy="close-modal"]').click();
cy.visit('/Experiments');
cy.finishedLoading();
Expand Down
Loading
Loading