Created
January 4, 2017 11:11
-
-
Save wlsf82/2b065a21c0cd8046a29cdd470ce1a452 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is how the test is today. | |
"use strict"; | |
const AppearInRoom = require("../page-objects/appearInRoom"); | |
const Helper = require("../helper"); | |
const RoomActivity = require("../page-objects/roomActivity"); | |
const shortid = require("shortid"); | |
describe("Activity list", () => { | |
const appearInRoom = new AppearInRoom(); | |
const helper = new Helper(); | |
const roomActivity = new RoomActivity(); | |
let randomRoomName; | |
beforeEach(() => { | |
randomRoomName = shortid.generate(); | |
appearInRoom.visit(randomRoomName); | |
helper.clickWhenClickable(roomActivity.refreshButton); | |
helper.sleepForNSeconds(3); | |
}); | |
it("should remove item from the activity list", () => { | |
roomActivity.listItems.count().then((numberOfItemsBeforeRemoval) => { | |
roomActivity.removeFirstItem(); | |
helper.sleepForNSeconds(3); | |
roomActivity.listItems.count().then((numberOfItemsAfterRemoval) => { | |
expect(numberOfItemsAfterRemoval).toEqual(numberOfItemsBeforeRemoval - 1); | |
}); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment