mirror of https://github.com/artf/grapesjs.git
12 changed files with 127 additions and 47 deletions
@ -1,26 +0,0 @@ |
|||||
## WARNING |
|
||||
READ and FOLLOW next 5 steps, then REMOVE them before posting the issue |
|
||||
|
|
||||
1. Follow CONTRIBUTING Guidelines https://github.com/artf/grapesjs/blob/master/CONTRIBUTING.md |
|
||||
2. Use the GitHub Issues EXCLUSIVELY for BUGS, FEATURE REQUESTS or QUESTIONS. Prefix the title of the issue with its context, eg. `[Bug]: ....` |
|
||||
3. Do a quick SEARCH first, to see if someone else didn't open the same issue |
|
||||
4. DON'T ASK to create examples/code for you, read DOCS and APIs first, then you can post what you have tried (we'd like to see your code) and what you're unable to achieve |
|
||||
5. All relative statements/questions have to be filled/answered, otherwise, the issue might be CLOSED |
|
||||
|
|
||||
## You're submitting a BUG |
|
||||
1. Are you using the latest release (older versions are NOT supported)? |
|
||||
1. If you're not sure, type `grapesjs.version` in console and press ENTER |
|
||||
1. Are you facing the bug with your local copy of GrapesJS or with the current demo? |
|
||||
1. If a local copy |
|
||||
1. Indicate all informations about your OS, browser and GrapesJS version. |
|
||||
1. Are you able to reproduce the bug from the demo? |
|
||||
1. What is the expected behavior? |
|
||||
1. What happens instead? |
|
||||
1. If you're able to reproduce the bug indicate all the necessary steps |
|
||||
1. Attach screenshots (using KAP/LICEcap), screencasts or live demo |
|
||||
1. JSFiddle Starter template https://jsfiddle.net/szLp8h4n |
|
||||
1. CodeSandbox Starter template https://codesandbox.io/s/1r0w2pk1vl |
|
||||
|
|
||||
## You're submitting a FEATURE REQUEST |
|
||||
1. Be sure to work on the latest version, as the feature might be already there |
|
||||
1. Keep in mind that the feature should be considered valid to use for everyone, not only for your case |
|
||||
@ -0,0 +1,36 @@ |
|||||
|
--- |
||||
|
name: 🐜 Bug report |
||||
|
about: If something is not working as excepted |
||||
|
title: 'BUG: ' |
||||
|
--- |
||||
|
|
||||
|
## WARNING |
||||
|
READ and FOLLOW next 3 steps, then REMOVE them before posting the issue |
||||
|
|
||||
|
1. Follow CONTRIBUTING Guidelines https://github.com/artf/grapesjs/blob/master/CONTRIBUTING.md |
||||
|
2. Do a quick SEARCH first, to see if someone else didn't open the same issue |
||||
|
3. All relative statements/questions have to be filled/answered, otherwise, the issue might be CLOSED |
||||
|
4. JSFiddle Starter template https://jsfiddle.net/szLp8h4n |
||||
|
5. CodeSandbox Starter template https://codesandbox.io/s/1r0w2pk1vl |
||||
|
|
||||
|
**Version:** |
||||
|
|
||||
|
*You can get the version by typing `grapesjs.version` into the console* |
||||
|
|
||||
|
**Are you able to reproduce the bug from the demo?** |
||||
|
|
||||
|
[ ] Yes |
||||
|
[ ] No |
||||
|
|
||||
|
**What is the expected behavior?** |
||||
|
|
||||
|
*Describe the bug **detailed*** |
||||
|
|
||||
|
**What is the current behavior?** |
||||
|
|
||||
|
*Descripe the bug **detailed*** |
||||
|
|
||||
|
**Are you able to attach screenshots, screencasts or a live demo?** |
||||
|
|
||||
|
[ ] Yes (attach) |
||||
|
[ ] No |
||||
@ -0,0 +1,28 @@ |
|||||
|
--- |
||||
|
name: 🚀 Feature request |
||||
|
about: If you have a feature request |
||||
|
title: 'FEAT: ' |
||||
|
--- |
||||
|
|
||||
|
## WARNING |
||||
|
READ and FOLLOW next 3 steps, then REMOVE them before posting the issue |
||||
|
|
||||
|
1. Follow CONTRIBUTING Guidelines https://github.com/artf/grapesjs/blob/master/CONTRIBUTING.md |
||||
|
2. Do a quick SEARCH first, to see if someone else didn't open the same issue |
||||
|
3. All relative statements/questions have to be filled/answered, otherwise, the issue might be CLOSED |
||||
|
4. JSFiddle Starter template https://jsfiddle.net/szLp8h4n |
||||
|
5. CodeSandbox Starter template https://codesandbox.io/s/1r0w2pk1vl |
||||
|
|
||||
|
**What are you trying to add to GrapesJS?** |
||||
|
|
||||
|
*Describe your feature request **detailed*** |
||||
|
|
||||
|
**Is there an alternative at the latest version?** |
||||
|
|
||||
|
[ ] Yes (descripe the alternative) |
||||
|
[ ] No |
||||
|
|
||||
|
**Is this related to an issue?** |
||||
|
|
||||
|
[ ] Yes (Give a link to the issue) |
||||
|
[ ] No |
||||
@ -0,0 +1 @@ |
|||||
|
blank_issues_enabled: false |
||||
@ -0,0 +1,36 @@ |
|||||
|
import ItemView from '../../../../src/navigator/view/ItemView'; |
||||
|
|
||||
|
describe('ItemView', () => { |
||||
|
let itemView, fakeModel, fakeModelStyle; |
||||
|
|
||||
|
beforeEach(() => { |
||||
|
fakeModelStyle = {}; |
||||
|
|
||||
|
fakeModel = { |
||||
|
get: jest.fn(), |
||||
|
set: jest.fn(), |
||||
|
getStyle: jest.fn(() => fakeModelStyle) |
||||
|
}; |
||||
|
|
||||
|
itemView = new ItemView({ |
||||
|
model: fakeModel, |
||||
|
config: { |
||||
|
em: { |
||||
|
get: jest.fn(() => ({ stylePrefix: '' })) |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
}); |
||||
|
|
||||
|
describe('.isVisible', () => { |
||||
|
it("should return `false` if the model's `style` object has a `display` property set to `none`, `true` otherwise", () => { |
||||
|
expect(itemView.isVisible()).toEqual(true); |
||||
|
fakeModelStyle.display = ''; |
||||
|
expect(itemView.isVisible()).toEqual(true); |
||||
|
fakeModelStyle.display = 'none'; |
||||
|
expect(itemView.isVisible()).toEqual(false); |
||||
|
fakeModelStyle.display = 'block'; |
||||
|
expect(itemView.isVisible()).toEqual(true); |
||||
|
}); |
||||
|
}); |
||||
|
}); |
||||
Loading…
Reference in new issue