All tests passing locally. We no longer need Chrome in buildkite
This commit is contained in:
parent
e6d8487302
commit
802092bf9a
2 changed files with 9 additions and 16 deletions
|
@ -27,18 +27,12 @@ steps:
|
||||||
image: "matrixdotorg/riotweb-ci-e2etests-env:latest"
|
image: "matrixdotorg/riotweb-ci-e2etests-env:latest"
|
||||||
propagate-environment: true
|
propagate-environment: true
|
||||||
|
|
||||||
- label: ":karma: Tests"
|
- label: ":jest: Tests"
|
||||||
agents:
|
agents:
|
||||||
# We use a medium sized instance instead of the normal small ones because
|
# We use a medium sized instance instead of the normal small ones because
|
||||||
# webpack loves to gorge itself on resources.
|
# webpack loves to gorge itself on resources.
|
||||||
queue: "medium"
|
queue: "medium"
|
||||||
command:
|
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
|
# Run tests
|
||||||
# TODO: Remove hacky chmod for BuildKite
|
# TODO: Remove hacky chmod for BuildKite
|
||||||
- "chmod +x ./scripts/ci/*.sh"
|
- "chmod +x ./scripts/ci/*.sh"
|
||||||
|
@ -47,8 +41,6 @@ steps:
|
||||||
- "./scripts/ci/install-deps.sh"
|
- "./scripts/ci/install-deps.sh"
|
||||||
- "echo '+++ Running Tests'"
|
- "echo '+++ Running Tests'"
|
||||||
- "./scripts/ci/unit-tests.sh"
|
- "./scripts/ci/unit-tests.sh"
|
||||||
env:
|
|
||||||
CHROME_BIN: "/usr/bin/google-chrome-stable"
|
|
||||||
plugins:
|
plugins:
|
||||||
- docker#v3.0.1:
|
- docker#v3.0.1:
|
||||||
image: "node:10"
|
image: "node:10"
|
||||||
|
|
|
@ -27,13 +27,7 @@ describe('RoomViewStore', function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('can be used to view a room by alias and join', function(done) {
|
it('can be used to view a room by alias and join', function(done) {
|
||||||
peg.get().getRoomIdForAlias.mockResolvedValue({room_id: "!randomcharacters:aser.ver"});
|
const token = RoomViewStore.addListener(() => {
|
||||||
peg.get().joinRoom = async (roomAddress) => {
|
|
||||||
expect(roomAddress).toBe("#somealias2:aser.ver");
|
|
||||||
done();
|
|
||||||
};
|
|
||||||
|
|
||||||
RoomViewStore.addListener(() => {
|
|
||||||
// Wait until the room alias has resolved and the room ID is
|
// Wait until the room alias has resolved and the room ID is
|
||||||
if (!RoomViewStore.isRoomLoading()) {
|
if (!RoomViewStore.isRoomLoading()) {
|
||||||
expect(RoomViewStore.getRoomId()).toBe("!randomcharacters:aser.ver");
|
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' });
|
dispatch({ action: 'view_room', room_alias: '#somealias2:aser.ver' });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue