All tests passing locally. We no longer need Chrome in buildkite

This commit is contained in:
Michael Telatynski 2019-12-17 11:53:18 +00:00
parent e6d8487302
commit 802092bf9a
2 changed files with 9 additions and 16 deletions

View File

@ -27,18 +27,12 @@ steps:
image: "matrixdotorg/riotweb-ci-e2etests-env:latest"
propagate-environment: true
- label: ":karma: Tests"
- label: ":jest: Tests"
agents:
# We use a medium sized instance instead of the normal small ones because
# webpack loves to gorge itself on resources.
queue: "medium"
command:
# Install chrome
- "echo '--- Installing Chrome'"
- "wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -"
- "sh -c 'echo \"deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main\" >> /etc/apt/sources.list.d/google.list'"
- "apt-get update"
- "apt-get install -y google-chrome-stable"
# Run tests
# TODO: Remove hacky chmod for BuildKite
- "chmod +x ./scripts/ci/*.sh"
@ -47,8 +41,6 @@ steps:
- "./scripts/ci/install-deps.sh"
- "echo '+++ Running Tests'"
- "./scripts/ci/unit-tests.sh"
env:
CHROME_BIN: "/usr/bin/google-chrome-stable"
plugins:
- docker#v3.0.1:
image: "node:10"

View File

@ -27,13 +27,7 @@ describe('RoomViewStore', function() {
});
it('can be used to view a room by alias and join', function(done) {
peg.get().getRoomIdForAlias.mockResolvedValue({room_id: "!randomcharacters:aser.ver"});
peg.get().joinRoom = async (roomAddress) => {
expect(roomAddress).toBe("#somealias2:aser.ver");
done();
};
RoomViewStore.addListener(() => {
const token = RoomViewStore.addListener(() => {
// Wait until the room alias has resolved and the room ID is
if (!RoomViewStore.isRoomLoading()) {
expect(RoomViewStore.getRoomId()).toBe("!randomcharacters:aser.ver");
@ -42,6 +36,13 @@ describe('RoomViewStore', function() {
}
});
peg.get().getRoomIdForAlias.mockResolvedValue({room_id: "!randomcharacters:aser.ver"});
peg.get().joinRoom = async (roomAddress) => {
token.remove(); // stop RVS listener
expect(roomAddress).toBe("#somealias2:aser.ver");
done();
};
dispatch({ action: 'view_room', room_alias: '#somealias2:aser.ver' });
});
});