feat: compose the portfolio journey layer
This commit is contained in:
@@ -51,14 +51,15 @@ describe('semantic section components', () => {
|
||||
});
|
||||
|
||||
it('does not turn private project content into a link container', () => {
|
||||
const wrapper = mount(ProjectCaseStudy, { props: { project: privateProject } });
|
||||
const wrapper = mount(ProjectCaseStudy, { props: { project: privateProject, priority: 'primary' } });
|
||||
|
||||
expect(wrapper.get('article').findAll('a')).toHaveLength(0);
|
||||
expect(wrapper.get('h3').text()).toBe('Private self-hosted medication tracker');
|
||||
expect(wrapper.get('article').attributes('data-project-priority')).toBe('primary');
|
||||
});
|
||||
|
||||
it('uses a safe external link only for a public project with an approved URL', () => {
|
||||
const wrapper = mount(ProjectCaseStudy, { props: { project: publicProject } });
|
||||
const wrapper = mount(ProjectCaseStudy, { props: { project: publicProject, priority: 'supporting' } });
|
||||
const link = wrapper.get('article a');
|
||||
|
||||
expect(link.attributes('href')).toBe('https://github.com/example/footy-tracker');
|
||||
@@ -88,11 +89,11 @@ describe('semantic section components', () => {
|
||||
const wrapper = mount(ContactDestination, {
|
||||
props: {
|
||||
contact,
|
||||
identity: { name: 'Luca Pîslaru', role: 'System Administrator & Full-Stack Developer' },
|
||||
},
|
||||
});
|
||||
|
||||
expect(wrapper.get('a[href="mailto:hello@example.test"]').text()).toBe('hello@example.test');
|
||||
expect(wrapper.get('a[href="mailto:hello@example.test"]').text()).toBe('Start a conversation');
|
||||
expect(wrapper.text()).toContain("Thanks for making the trip. The road's open if you'd like to build something together.");
|
||||
const social = wrapper.get('a[href="https://github.com/example"]');
|
||||
expect(social.text()).toBe('GitHub');
|
||||
expect(social.attributes('rel')).toBe('noopener noreferrer');
|
||||
|
||||
Reference in New Issue
Block a user