Skip to content

Commit

Permalink
Fix application title unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
fxha committed Dec 13, 2018
1 parent a32a2ec commit 00d6b77
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .travis.yml
Expand Up @@ -51,9 +51,11 @@ install:
script:
- yarn run lint

# Unit and e2e tests
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then xvfb-run --server-args="-screen 0 1024x768x24" yarn run test ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then yarn run test ; fi

# Build binaries
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then yarn run release:linux ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then yarn run release:mac ; fi

Expand Down
1 change: 1 addition & 0 deletions src/muya/lib/parser/render/renderBlock/renderLeafBlock.js
Expand Up @@ -188,6 +188,7 @@ export default function renderLeafBlock (block, cursor, activeBlocks, matches, u
if (/^h\d$/.test(type)) {
Object.assign(data.dataset, {
head: type,
// TODO(#590): Slugify heading
id: '' // isInElectron ? require('markdown-toc').slugify(text.replace(/^#+\s(.*)/, (_, p1) => p1)) : ''
})
selector += `.${headingStyle}`
Expand Down
1 change: 1 addition & 0 deletions src/renderer/store/editor.js
Expand Up @@ -15,6 +15,7 @@ const state = {

const getters = {
toc: state => {
// TODO(#590): Create necessary data while parsing the document.
// const { currentFile } = state
// console.log(toc(currentFile.markdown).json) // #DEBUG
// content: "GitHub Flavored Markdown"
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/specs/Launch.spec.js
Expand Up @@ -7,7 +7,8 @@ describe('Launch', function () {
it('shows the proper application title', function () {
return this.app.client.getTitle()
.then(title => {
expect(title).to.equal('Untitled-1')
const expectedTitle = process.platform === 'darwin' ? 'Mark Text' : 'Untitled-1'
expect(title).to.equal(expectedTitle)
})
})
})

0 comments on commit 00d6b77

Please sign in to comment.