mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-08-25 07:42:20 +10:00
Show experience position with role progression (#3116)
This commit is contained in:
@@ -0,0 +1,15 @@
|
|||||||
|
import { readFileSync } from "node:fs";
|
||||||
|
import { fileURLToPath } from "node:url";
|
||||||
|
import { describe, expect, it } from "vitest";
|
||||||
|
|
||||||
|
const source = readFileSync(fileURLToPath(new URL("./sections.tsx", import.meta.url)), "utf8");
|
||||||
|
|
||||||
|
describe("ExperienceSection", () => {
|
||||||
|
it("does not hide the item position header when role progression is present", () => {
|
||||||
|
expect(source).not.toContain("item.roles.length === 0 && (hasPosition || hasSplitRowText(headerPeriod))");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("does not repeat the summary period after rendering it in a role-progression header", () => {
|
||||||
|
expect(source).not.toContain("item.roles.length > 0 && <Text>{item.period}</Text>");
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -415,7 +415,7 @@ const ExperienceSection = ({ sectionId = "experience", sectionData }: ItemSectio
|
|||||||
{hasSplitRowText(headerLocation) && <Text style={composeStyles(alignEndStyle)}>{headerLocation}</Text>}
|
{hasSplitRowText(headerLocation) && <Text style={composeStyles(alignEndStyle)}>{headerLocation}</Text>}
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{item.roles.length === 0 && (hasPosition || hasSplitRowText(headerPeriod)) && (
|
{(hasPosition || hasSplitRowText(headerPeriod)) && (
|
||||||
<View style={composeStyles(splitRowStyle)}>
|
<View style={composeStyles(splitRowStyle)}>
|
||||||
{hasPosition && <Text>{item.position}</Text>}
|
{hasPosition && <Text>{item.position}</Text>}
|
||||||
{hasSplitRowText(headerPeriod) && <Text style={composeStyles(alignEndStyle)}>{headerPeriod}</Text>}
|
{hasSplitRowText(headerPeriod) && <Text style={composeStyles(alignEndStyle)}>{headerPeriod}</Text>}
|
||||||
@@ -428,8 +428,6 @@ const ExperienceSection = ({ sectionId = "experience", sectionData }: ItemSectio
|
|||||||
<SectionItem key={item.id}>
|
<SectionItem key={item.id}>
|
||||||
<SectionItemHeader>{inlineItemHeader ? renderInlineHeader() : renderSplitHeader()}</SectionItemHeader>
|
<SectionItemHeader>{inlineItemHeader ? renderInlineHeader() : renderSplitHeader()}</SectionItemHeader>
|
||||||
|
|
||||||
{item.roles.length > 0 && <Text>{item.period}</Text>}
|
|
||||||
|
|
||||||
{item.roles.map((role) => (
|
{item.roles.map((role) => (
|
||||||
<View key={role.id}>
|
<View key={role.id}>
|
||||||
<View style={composeStyles(splitRowStyle)}>
|
<View style={composeStyles(splitRowStyle)}>
|
||||||
|
|||||||
Reference in New Issue
Block a user