Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- beforeEach(function() {
- jasmine.addMatchers({
- toHaveClass: function() {
- return {
- compare: function(actual, expected) {
- return {
- pass: actual.getAttribute('class').then(function(classes) {
- return classes.split(' ').indexOf(expected) !== -1;
- })
- }
- }
- }
- }
- });
- this.driver = new webdriver.Builder().forBrowser('firefox').build();
- this.driver.manage().window().maximize();
- this.driver.get('http://localhost:8000/');
- });
- it('should not create conflicts between the headers', function() {
- this.driver.manage().window().setSize(767, 632);
- this.driver.findElement(webdriver.By.className('navbar-toggle')).click();
- var headerBar = this.driver.findElement(webdriver.By.className('navbar-collapse'));
- this.driver.manage().window().setSize(1000, 632).then(function() {
- expect(headerBar).not.toHaveClass('in');
- });
- });
- jasmine.addMatchers({
- toNotHaveClass: function() {
- return {
- compare: function(actual, expected) {
- return {
- pass: actual.getAttribute('class').then(function(classes) {
- return classes.split(' ').indexOf(expected) === -1;
- })
- }
- }
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement