public async Task Message_history() { const string userName = "******"; const string password = "******"; IRocketChatDriver driver = new RocketChatDriver("dev0:3000", false, new XUnitLogger(_helper)); await driver.ConnectAsync(); var loginResult = await driver.LoginWithEmailAsync(userName, password); var result = await driver.LoadMessagesAsync("GENERAL"); driver.Dispose(); }
public async Task Should_do_something_on_bad_creds() { const string userName = "******"; const string password = "******"; var driver = new RocketChatDriver("dev0:3000", false, new XUnitLogger(_helper)); await driver.ConnectAsync(); var loginResult = await driver.LoginWithEmailAsync(userName, password); Assert.Equal("403", loginResult.error.error.ToString()); driver.Dispose(); }
public async Task Send_attachments() { //const string password = "******"; //var driver = new RocketChatDriver("demo.rocket.chat", true, _xUnitLogger); var userName = Constants.OneEmail; var password = Constants.OnePassword; var driver = new RocketChatDriver(Constants.RocketServer, false, _xUnitLogger); await driver.ConnectAsync(); await driver.LoginWithEmailAsync(userName, password); var roomId = await driver.GetRoomIdAsync("GENERAL"); //var a = await driver.SendCustomMessageAsync("test mesage", "name", roomId.Result); driver.Dispose(); }
public async Task Can_login() { const string userName = "******"; const string password = "******"; var driver = new RocketChatDriver("dev0:3000", false, new XUnitLogger(_helper)); await driver.ConnectAsync(); var loginResult = await driver.LoginWithEmailAsync(userName, password); var roomId = await driver.GetRoomIdAsync("GENERAL"); await driver.JoinRoomAsync(roomId); await driver.SubscribeToRoomAsync(roomId); await driver.SendMessageAsync("hello world", roomId); driver.Dispose(); }
public async Task Can_login() { //const string password = "******"; //var driver = new RocketChatDriver("demo.rocket.chat", true, _xUnitLogger); var driver = new RocketChatDriver(Constants.RocketServer, false, _xUnitLogger); await driver.ConnectAsync(); var loginResult = await driver.LoginWithEmailAsync(Constants.OneEmail, Constants.OnePassword); var roomId = await driver.GetRoomIdAsync("GENERAL"); await driver.JoinRoomAsync(roomId.Result); await driver.SubscribeToRoomAsync(roomId.Result); var messages = await driver.SendMessageAsync("", roomId.Result); driver.Dispose(); }