message: Refactored e2e specs for score-board challenges
diff: @@ -2,7 +2,7 @@ const config = require('config')
  describe('/#/score-board', () => {
  describe('challenge "scoreBoard"', () => {
  - xit('should be possible to access score board', () => {
  + it('should be possible to access score board', () => {
  browser.get('/#/score-board')
  expect(browser.getCurrentUrl()).toMatch(/\/score-board/)
  })
  @@ -11,41 +11,41 @@ describe('/#/score-board', () => {
  })
  describe('challenge "continueCode"', () => {
  - xit('should be possible to solve the non-existent challenge #99', () => {
  - browser.executeScript('var $http = angular.element(document.body).injector().get(\'$http\'); $http.put(\'/rest/continue-code/apply/69OxrZ8aJEgxONZyWoz1Dw4BvXmRGkKgGe9M7k2rK63YpqQLPjnlb5V5LvDj\');')
  + it('should be possible to solve the non-existent challenge #99', () => {
  + browser.executeScript('var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.status == 200) { console.log("Success"); } }; xhttp.open("PUT","http://localhost:3000/rest/continue-code/apply/69OxrZ8aJEgxONZyWoz1Dw4BvXmRGkKgGe9M7k2rK63YpqQLPjnlb5V5LvDj", true); xhttp.setRequestHeader("Content-type","application/json"); xhttp.send();') // eslint-disable-line
  browser.get('/#/score-board')
  })
  protractor.expect.challengeSolved({challenge: 'Imaginary Challenge'})
  })
  - describe('repeat notification', () => {
  - let alertsBefore, alertsNow
  + // describe('repeat notification', () => {
  + // let alertsBefore, alertsNow
  - beforeEach(() => {
  - browser.get('/#/score-board')
  - })
  + // beforeEach(() => {
  + // browser.get('/#/score-board')
  + // })
  - if (config.get('application.showChallengeSolvedNotifications') && config.get('ctf.showFlagsInNotifications')) {
  - xit('should be possible when in CTF mode', () => {
  - alertsBefore = element.all(by.className('alert')).count()
  + // if (config.get('application.showChallengeSolvedNotifications') && config.get('ctf.showFlagsInNotifications')) {
  + // xit('should be possible when in CTF mode', () => {
  + // alertsBefore = element.all(by.className('alert')).count()
  - element(by.id('Score Board.solved')).click()
  + // element(by.id('Score Board.solved')).click()
  - alertsNow = element.all(by.className('alert')).count()
  + // alertsNow = element.all(by.className('alert')).count()
  - expect(alertsBefore).not.toBe(alertsNow)
  - })
  - } else {
  - xit('should not be possible when not in CTF mode', () => {
  - alertsBefore = element.all(by.className('alert')).count()
  + // expect(alertsBefore).not.toBe(alertsNow)
  + // })
  + // } else {
  + // xit('should not be possible when not in CTF mode', () => {
  + // alertsBefore = element.all(by.className('alert')).count()
  - element(by.id('Score Board.solved')).click()
  + // element(by.id('Score Board.solved')).click()
  - alertsNow = element.all(by.className('alert')).count()
  + // alertsNow = element.all(by.className('alert')).count()
  - expect(alertsBefore).toBe(alertsNow)
  - })
  - }
  - })
  + // expect(alertsBefore).toBe(alertsNow)
  + // })
  + // }
  + // })
  })
  