macos-defaults/build/docsify/__snapshots__/write-pages.test.js.snap
Yann Bertrand 3eb3fa5605
♻️ Normalize templates
- Allow special chars in category name and page title
- Improve HTML image attributes readibility
- Prod: allow double quotes in category and page descriptions
2020-09-26 20:24:54 +02:00

379 lines
7.6 KiB
Text

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`write-pages one category, one page with image example should write a category/page.md file using the page template 1`] = `
"# Page
> Page description.
- **Tested on macOS**:
* Big Sur
- **Parameter type**: bool
## Set to \`true\` (default value)
\`\`\`bash
defaults write com.apple.category page -bool true
\`\`\`
<img
src=\\"/category-page-true.png\\"
alt=\\"Example output with value set to true\\"
width=\\"600\\" height=\\"400\\" style=\\"height: auto\\"
/>
## Set to \`false\`
\`\`\`bash
defaults write com.apple.category page -bool false
\`\`\`
<img
src=\\"/category-page-false.png\\"
alt=\\"Example output with value set to false\\"
width=\\"400\\" height=\\"200\\" style=\\"height: auto\\"
/>
## Read current value
\`\`\`bash
defaults read com.apple.category page
\`\`\`
## Delete current value
\`\`\`bash
defaults delete com.apple.category page
\`\`\`
"
`;
exports[`write-pages one category, one page with text and possible values example should write a category/page.md file using the page template 1`] = `
"# Page
> Page description.
- **Tested on macOS**:
* Big Sur
- **Parameter type**: string
* start
* middle
* end
## Set to \`start\`
\`\`\`bash
defaults write com.apple.category page -string start
\`\`\`
- output when value is start
## Set to \`middle\` (default value)
\`\`\`bash
defaults write com.apple.category page -string middle
\`\`\`
- output when value is middle
## Set to \`end\`
\`\`\`bash
defaults write com.apple.category page -string end
\`\`\`
- output when value is end
## Read current value
\`\`\`bash
defaults read com.apple.category page
\`\`\`
## Delete current value
\`\`\`bash
defaults delete com.apple.category page
\`\`\`
"
`;
exports[`write-pages one category, one page with text example with an after command should write a category/page.md file using the page template 1`] = `
"# Page
> Page description.
- **Tested on macOS**:
* Big Sur
- **Parameter type**: string
## Set to \`~/Desktop\` (default value)
\`\`\`bash
defaults write com.apple.category page -string ~/Desktop && killall App
\`\`\`
- output when value is ~/Desktop
## Set to \`~/Pictures\`
\`\`\`bash
defaults write com.apple.category page -string ~/Pictures && killall App
\`\`\`
- output when value is ~/Pictures
## Read current value
\`\`\`bash
defaults read com.apple.category page
\`\`\`
## Delete current value
\`\`\`bash
defaults delete com.apple.category page && killall App
\`\`\`
"
`;
exports[`write-pages one category, one page with text example with requirements should write a category/page.md file using the page template 1`] = `
"# Page
> Page description.
- **Tested on macOS**:
* Big Sur
- **Parameter type**: string
## Requirements
- [\`com.apple.category2 another-key\`](another-category/another-key?id=set-to-true) must be set to \`true\`
- [\`com.apple.category2 a-third-key\`](a-third-category/a-third-key?id=set-to-0.5) must be set to \`0.5\`
## Set to \`true\` (default value)
\`\`\`bash
defaults write com.apple.category page -string true && killall App
\`\`\`
- output when value is true
## Set to \`false\`
\`\`\`bash
defaults write com.apple.category page -string false && killall App
\`\`\`
- output when value is false
## Read current value
\`\`\`bash
defaults read com.apple.category page
\`\`\`
## Delete current value
\`\`\`bash
defaults delete com.apple.category page && killall App
\`\`\`
"
`;
exports[`write-pages one category, one page with text example with special chars values should write a category/page.md file using the page template 1`] = `
"# Page
> Page description.
- **Tested on macOS**:
* Big Sur
- **Parameter type**: string
## Set to \`~/Desktop\` (default value)
\`\`\`bash
defaults write com.apple.category page -string ~/Desktop
\`\`\`
- output when value is ~/Desktop
## Set to \`~/Pictures\`
\`\`\`bash
defaults write com.apple.category page -string ~/Pictures
\`\`\`
- output when value is ~/Pictures
## Read current value
\`\`\`bash
defaults read com.apple.category page
\`\`\`
## Delete current value
\`\`\`bash
defaults delete com.apple.category page
\`\`\`
"
`;
exports[`write-pages one category, one page with video example should write a category/page.md file using the page template 1`] = `
"# Page
> Page description.
- **Tested on macOS**:
* Big Sur
- **Parameter type**: float
## Set to \`0\` (default value)
\`\`\`bash
defaults write com.apple.category page -float 0
\`\`\`
<video autoplay loop muted playsinline width=\\"750\\" height=\\"400\\" style=\\"max-width: 100%; height: auto\\">
<source src=\\"/category-page-0.mp4\\" type=\\"video/mp4\\">
Example output with value set to 0
</video>
## Set to \`0.5\`
\`\`\`bash
defaults write com.apple.category page -float 0.5
\`\`\`
<video autoplay loop muted playsinline width=\\"720\\" height=\\"390\\" style=\\"max-width: 100%; height: auto\\">
<source src=\\"/category-page-0.5.mp4\\" type=\\"video/mp4\\">
Example output with value set to 0.5
</video>
## Read current value
\`\`\`bash
defaults read com.apple.category page
\`\`\`
## Delete current value
\`\`\`bash
defaults delete com.apple.category page
\`\`\`
"
`;
exports[`write-pages one category, two pages should write a category/page1.md file using the page template 1`] = `
"# Page 1
> Page 1 description.
- **Tested on macOS**:
* Big Sur
- **Parameter type**: bool
## Set to \`true\` (default value)
\`\`\`bash
defaults write com.apple.category page1 -bool true
\`\`\`
- output when value is true
## Set to \`false\`
\`\`\`bash
defaults write com.apple.category page1 -bool false
\`\`\`
- output when value is false
## Read current value
\`\`\`bash
defaults read com.apple.category page1
\`\`\`
## Delete current value
\`\`\`bash
defaults delete com.apple.category page1
\`\`\`
"
`;
exports[`write-pages one category, two pages should write a category/page2.md file using the page template 1`] = `
"# Page 2
> Page 2 description.
- **Tested on macOS**:
* Big Sur
- **Parameter type**: bool
## Set to \`true\`
\`\`\`bash
defaults write com.apple.category page2 -bool true
\`\`\`
- output when value is true
## Set to \`false\` (default value)
\`\`\`bash
defaults write com.apple.category page2 -bool false
\`\`\`
- output when value is false
## Read current value
\`\`\`bash
defaults read com.apple.category page2
\`\`\`
## Delete current value
\`\`\`bash
defaults delete com.apple.category page2
\`\`\`
"
`;
exports[`write-pages two categories, one page in each should write a category1/page.md file using the page template 1`] = `
"# Page
> Page description.
- **Tested on macOS**:
* Big Sur
- **Parameter type**: bool
## Set to \`true\` (default value)
\`\`\`bash
defaults write com.apple.category1 page -bool true
\`\`\`
- output when value is true
## Set to \`false\`
\`\`\`bash
defaults write com.apple.category1 page -bool false
\`\`\`
- output when value is false
## Read current value
\`\`\`bash
defaults read com.apple.category1 page
\`\`\`
## Delete current value
\`\`\`bash
defaults delete com.apple.category1 page
\`\`\`
"
`;
exports[`write-pages two categories, one page in each should write a category2/page.md file using the page template 1`] = `
"# Page
> Page description.
- **Tested on macOS**:
* Big Sur
- **Parameter type**: bool
## Set to \`true\`
\`\`\`bash
defaults write com.apple.category2 page -bool true
\`\`\`
- output when value is true
## Set to \`false\` (default value)
\`\`\`bash
defaults write com.apple.category2 page -bool false
\`\`\`
- output when value is false
## Read current value
\`\`\`bash
defaults read com.apple.category2 page
\`\`\`
## Delete current value
\`\`\`bash
defaults delete com.apple.category2 page
\`\`\`
"
`;