import React from 'react';
import { expect } from 'chai';
import { shallow } from 'enzyme';
import Panel from '../../src/components/Panel.jsx';
const Enzyme = require('enzyme');
const Adapter = require('enzyme-adapter-react-15');
Enzyme.configure({ adapter: new Adapter() });
describe('<Panel /> component', () => {
let props;
const getPanelWrapper = () => shallow(<Panel {...props}/>);
it('should make regions filter query string', () => {
const regions =
{
"key":"region",
"value":
[
"Nordic > Nordic > Denmark",
"Nordic > Finland",
"Nordic > Norway",
"Nordic > Sweden"
]
};
const expected = "regions=DK+FI+NO+SE";
expect(getPanelWrapper().instance().makeRegionsQueryString(regions)).to.equal(expected);
});
});
根据我在Internet上阅读的内容,角色属性为盲人的人们带来了好处。 如果我的网站面向的不是盲人, 我是否应该使用它?
答案 0 :(得分:0)
该属性描述当前元素在文档上下文中扮演的角色。例如,应用程序和辅助技术可以使用它来确定元素的用途。