Skip to content

Fix PassportTest and improve scoping#1233

Open
labkey-jeckels wants to merge 3 commits into
release25.7-SNAPSHOTfrom
25.7_fb_scopingFixes
Open

Fix PassportTest and improve scoping#1233
labkey-jeckels wants to merge 3 commits into
release25.7-SNAPSHOTfrom
25.7_fb_scopingFixes

Conversation

@labkey-jeckels

Copy link
Copy Markdown
Contributor

Rationale

PassportTest needs an update to expect the updated data being pulled dynamically from UniProt

Changes

  • Be tolerant of changes in protein metadata from third-party service
  • Add container checks
  • Backport query name quoting

@labkey-jeckels labkey-jeckels added this to the 25.07 milestone Jun 14, 2026
@labkey-jeckels labkey-jeckels requested a review from vagisha June 14, 2026 14:31
@labkey-jeckels labkey-jeckels self-assigned this Jun 14, 2026

/**
* Container-scoping integration tests for {@link TargetedMSController} actions that resolve an object by a
* global id. Each test sets up the same object in one folder and confirms the action rejects a request that addresses

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment truncated? Should it be "...that addresses the object through a different folder."?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Fixed.

@Test
public void auditLogExtraInfoIsContainerScoped() throws Exception
{
UnitTestUtil.cleanupDatabase(DOC_GUID);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this redundant with @After cleanupAuditLog()?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Largely, yes. Better to mark that method as both Before and After and remove this call. Done.

public void waitForElementsAtLeast(final Locator loc, final int count)
{
waitFor(() -> loc.findElements(getDriver()).size() >= count, WAIT_FOR_JAVASCRIPT);
assertTrue("Element not present at least the expected number of times", loc.findElements(getDriver()).size() >= count);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loc.findElements(getDriver()).size() is getting called twice.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, but one is inside the lambda. We could reuse the result but I think it's a bit cleaner (and reasonable) to check again outside the lambda.

@vagisha vagisha left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants