-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standardise NodeProcessor.data.ts constant names #2483
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,29 +38,6 @@ export const PROCESS_PANEL_HEADER_SLOT_TAKES_PRIORITY_EXPECTED = ` | |
|
||
export const PROCESS_PANEL_HEADER_SLOT_TAKES_PRIORITY_WARN_MSG = "panel has a header slot, 'header' attribute has no effect."; | ||
|
||
export const PROCESS_PANEL_HEADER_NO_OVERRIDE = ` | ||
<panel header="# Lorem ipsum" alt="**strong alt**"> | ||
<div slot="header"> | ||
This existing header slot should be preserved in favour over header attribute. | ||
</div> | ||
Header attribute should not be inserted under panel since there is both an alt attribute and header slot, | ||
but should be deleted. | ||
Alt attribute should be inserted under panel as slot. | ||
</panel> | ||
`; | ||
|
||
export const PROCESS_PANEL_HEADER_NO_OVERRIDE_EXPECTED = ` | ||
<panel><template #_alt><p><strong>strong alt</strong></p> | ||
</template> | ||
<template #header><div> | ||
This existing header slot should be preserved in favour over header attribute. | ||
</div></template> | ||
Header attribute should not be inserted under panel since there is both an alt attribute and header slot, | ||
but should be deleted. | ||
Alt attribute should be inserted under panel as slot. | ||
</panel> | ||
`; | ||
|
||
// Post Process | ||
|
||
export const POST_PROCESS_PANEL_ID_ASSIGNED_USING_HEADER_SLOT = ` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let me know if I'm missing something here, but it doesn't look like this one has an alt slot for it to test for it being inserted under panel as stated in your earlier comment? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. :O You are right - I think I got confused by the text in the constant. Will delete the other constant then |
||
|
@@ -92,18 +69,38 @@ export const PROCESS_QUESTION_ATTRIBUTES_EXPECTED = ` | |
</question> | ||
`; | ||
|
||
export const PROCESS_QUESTION_ATTRIBUTES_NO_OVERRIDE = ` | ||
<question header="**header**" hint="**hint**" answer="**answer**"> | ||
export const PROCESS_QUESTION_HEADER_SLOT_TAKES_PRIORITY = ` | ||
<question header="**header**"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NIT: Since this text is overridden - maybe you can change the overridden text to "lorum ipsum" or something like in the other tests? This was confusing to me because I didn't realise the difference between what was overridden for a while. Similar for hint & answer below |
||
<template slot="header"></template> | ||
<template slot="hint"></template> | ||
<template slot="answer"></template> | ||
</question> | ||
`; | ||
|
||
export const PROCESS_QUESTION_ATTRIBUTES_NO_OVERRIDE_EXPECTED = ` | ||
export const PROCESS_QUESTION_HEADER_SLOT_TAKES_PRIORITY_EXPECTED = ` | ||
<question> | ||
<template #header></template> | ||
</question> | ||
`; | ||
|
||
export const PROCESS_QUESTION_HINT_SLOT_TAKES_PRIORITY = ` | ||
<question hint="**hint**"> | ||
<template slot="hint"></template> | ||
</question> | ||
`; | ||
|
||
export const PROCESS_QUESTION_HINT_SLOT_TAKES_PRIORITY_EXPECTED = ` | ||
<question> | ||
<template #hint></template> | ||
</question> | ||
`; | ||
|
||
export const PROCESS_QUESTION_ANSWER_SLOT_TAKES_PRIORITY = ` | ||
<question answer="**answer**"> | ||
<template slot="answer"></template> | ||
</question> | ||
`; | ||
|
||
export const PROCESS_QUESTION_ANSWER_SLOT_TAKES_PRIORITY_EXPECTED = ` | ||
<question> | ||
<template #answer></template> | ||
</question> | ||
`; | ||
|
@@ -119,13 +116,13 @@ export const PROCESS_QOPTION_ATTRIBUTES_EXPECTED = ` | |
</q-option> | ||
`; | ||
|
||
export const PROCESS_QOPTION_ATTRIBUTES_NO_OVERRIDE = ` | ||
export const PROCESS_QOPTION_REASON_SLOT_TAKES_PRIORITY = ` | ||
<q-option reason="**lorem ipsum**"> | ||
<template slot="reason"></template> | ||
</q-option> | ||
`; | ||
|
||
export const PROCESS_QOPTION_ATTRIBUTES_NO_OVERRIDE_EXPECTED = ` | ||
export const PROCESS_QOPTION_REASON_SLOT_TAKES_PRIORITY_EXPECTED = ` | ||
<q-option> | ||
<template #reason></template> | ||
</q-option> | ||
|
@@ -142,13 +139,13 @@ export const PROCESS_QUIZ_ATTRIBUTES_EXPECTED = ` | |
</quiz> | ||
`; | ||
|
||
export const PROCESS_QUIZ_ATTRIBUTES_NO_OVERRIDE = ` | ||
export const PROCESS_QUIZ_INTRO_SLOT_TAKES_PRIORITY = ` | ||
<quiz intro="**lorem ipsum**"> | ||
<template slot="intro"></template> | ||
</quiz> | ||
`; | ||
|
||
export const PROCESS_QUIZ_ATTRIBUTES_NO_OVERRIDE_EXPECTED = ` | ||
export const PROCESS_QUIZ_INTRO_SLOT_TAKES_PRIORITY_EXPECTED = ` | ||
<quiz> | ||
<template #intro></template> | ||
</quiz> | ||
|
@@ -171,24 +168,35 @@ export const PROCESS_POPOVER_ATTRIBUTES_EXPECTED = ` | |
</popover> | ||
`; | ||
|
||
export const PROCESS_POPOVER_ATTRIBUTES_NO_OVERRIDE = ` | ||
<popover content="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec vel tellus elit." | ||
header="_Lorem ipsum_"> | ||
export const PROCESS_POPOVER_HEADER_SLOT_TAKES_PRIORITY = ` | ||
<popover header="_Lorem ipsum_"> | ||
<div slot="header">Some header slot content that should not be overwritten</div> | ||
<div slot="content">Some content slot that should not be overwritten</div> | ||
Content and header attributes should not be inserted under panel as slots, but should be deleted. | ||
Header attribute should not be inserted under panel as slot, but should be deleted. | ||
</popover> | ||
`; | ||
|
||
export const PROCESS_POPOVER_ATTRIBUTES_NO_OVERRIDE_EXPECTED = ` | ||
export const PROCESS_POPOVER_HEADER_SLOT_TAKES_PRIORITY_EXPECTED = ` | ||
<popover> | ||
<template #header><div>Some header slot content that should not be overwritten</div></template> | ||
<template #content><div>Some content slot that should not be overwritten</div></template> | ||
Content and header attributes should not be inserted under panel as slots, but should be deleted. | ||
Header attribute should not be inserted under panel as slot, but should be deleted. | ||
</popover> | ||
`; | ||
|
||
export const PROCESS_POPOVER_ATTRIBUTES_NO_OVERRIDE_HEADER_WARN_MSG = "popover has a header slot, 'header' attribute has no effect."; | ||
|
||
export const PROCESS_POPOVER_CONTENT_SLOT_TAKES_PRIORITY = ` | ||
<popover content="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec vel tellus elit."> | ||
<div slot="content">Some content slot that should not be overwritten</div> | ||
Content attribute should not be inserted under panel as slot, but should be deleted. | ||
</popover> | ||
`; | ||
|
||
export const PROCESS_POPOVER_CONTENT_SLOT_TAKES_PRIORITY_EXPECTED = ` | ||
<popover> | ||
<template #content><div>Some content slot that should not be overwritten</div></template> | ||
Content attribute should not be inserted under panel as slot, but should be deleted. | ||
</popover> | ||
`; | ||
export const PROCESS_POPOVER_ATTRIBUTES_NO_OVERRIDE_CONTENT_WARN_MSG = "popover has a content slot, 'content' attribute has no effect."; | ||
|
||
/* | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleted this constant instead of the other one because this also tests for whether the alt attribute is processed correctly, which is tested for in the
POST_PROCESS_PANEL_ID_ASSIGNED_USING_HEADER_SLOT
test in lines 66 to 76