Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions datahub-frontend/test/app/ApplicationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -940,12 +940,12 @@ public void testHappyPathOidc() throws ParseException {
assertEquals(TEST_USER, data.get("actor"));
// Default expiration is 24h, so should always be less than current time + 1 day since it stamps
// the time before this executes. Use a more generous tolerance to account for timezone
// differences
// and test execution time variations.
// differences, DST transitions, and test execution time variations.
// Increased tolerance to 22-26 hours to handle DST transitions (which can cause 1-hour shifts)
Date maxExpectedExpiration =
new Date(System.currentTimeMillis() + (25 * 60 * 60 * 1000)); // 25 hours
new Date(System.currentTimeMillis() + (26 * 60 * 60 * 1000)); // 26 hours
Date minExpectedExpiration =
new Date(System.currentTimeMillis() + (23 * 60 * 60 * 1000)); // 23 hours
new Date(System.currentTimeMillis() + (22 * 60 * 60 * 1000)); // 22 hours
Date actualExpiration = claims.getExpirationTime();

assertTrue(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,9 @@ export const Table = <T,>({
const canExpand = expandable?.rowExpandable?.(row); // Check if row is expandable
const key = `row-${index}-${sortColumn ?? 'none'}-${sortOrder ?? 'none'}`;
return (
<>
<React.Fragment key={key}>
{/* Render the main row */}
<TableRow
key={key}
canExpand={canExpand}
onClick={(e) => {
if (focusedRowIndex === index) {
Expand Down Expand Up @@ -298,7 +297,7 @@ export const Table = <T,>({
</TableCell>
</TableRow>
)}
</>
</React.Fragment>
);
})}
{footer}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ export default function NavBarMenu({ menu, selectedKey, isCollapsed, iconSize, s

return (
<StyledMenu selectedKeys={selectedKey ? [selectedKey] : []} style={style} data-testid="nav-menu-links">
{menu.items.map((item) => renderMenuItem(item))}
{menu.items.map((item) => (
<React.Fragment key={item.key}>{renderMenuItem(item)}</React.Fragment>
))}
</StyledMenu>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ describe('formatTimezone', () => {
expect(['EST', 'EDT']).toContain(nycAbbr);

const londonAbbr = formatTimezone('Europe/London');
expect(['GMT+1', 'BST', 'GMT']).toContain(londonAbbr);
expect(['GMT', 'BST']).toContain(londonAbbr);

// Tokyo doesn't observe DST, so it's always GMT+9
expect(formatTimezone('Asia/Tokyo')).toBe('GMT+9');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const CreateNewTagModal: React.FC<CreateNewTagModalProps> = ({ onClose, open })
setSelectedOwnerUrns([]);
} catch (e: any) {
message.destroy();
message.error('Failed to create tag. An unexpected error occurred');
message.error(`Failed to create tag. ${e.message}`);
} finally {
setIsLoading(false);
}
Expand Down Expand Up @@ -136,7 +136,15 @@ const CreateNewTagModal: React.FC<CreateNewTagModalProps> = ({ onClose, open })
];

return (
<Modal title="Create New Tag" onCancel={onClose} buttons={buttons} open={open} centered width={500}>
<Modal
title="Create New Tag"
onCancel={onClose}
buttons={buttons}
open={open}
centered
width={500}
dataTestId="create-tag-modal"
>
{/* Tag Details Section */}
<TagDetailsSection
tagName={tagName}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ export default class TagsPageHelper {
cy.clickOptionWithTestId("create-tag-modal-create-button");

if (shouldBeSuccessfullyCreated) {
cy.waitTextVisible(`Tag "${name}" successfully created`);
// Wait for modal to close - check that add button is available again
cy.getWithTestId("add-tag-button").should("be.visible");
} else {
cy.waitTextVisible("Failed to create tag. An unexpected error occurred");
// Wait for any error message that starts with "Failed to create tag."
cy.contains(/Failed to create tag\./).should("be.visible");
cy.clickOptionWithTestId("create-tag-modal-cancel-button");
}
}
Expand Down
Loading