Skip to content
Snippets Groups Projects
Commit a3950754 authored by Paul Kaplan's avatar Paul Kaplan
Browse files

Add integration tests for surprise and empty costumes

parent 2d395e34
Branches
Tags
No related merge requests found
......@@ -25,7 +25,7 @@ describe('Working with costumes', () => {
await driver.quit();
});
test('Adding a costume', async () => {
test('Adding a costume through the library', async () => {
await loadUri(uri);
await clickXpath('//button[@title="tryit"]');
await clickText('Costumes');
......@@ -38,6 +38,32 @@ describe('Working with costumes', () => {
await expect(logs).toEqual([]);
});
test('Adding a costume by surprise button', async () => {
await loadUri(uri);
await clickXpath('//button[@title="tryit"]');
await clickText('Costumes');
const el = await findByXpath('//button[@aria-label="Choose a Costume"]');
await driver.actions().mouseMove(el)
.perform();
await driver.sleep(500); // Wait for thermometer menu to come up
await clickXpath('//button[@aria-label="Surprise"]');
const logs = await getLogs();
await expect(logs).toEqual([]);
});
test('Adding a costume by paint button', async () => {
await loadUri(uri);
await clickXpath('//button[@title="tryit"]');
await clickText('Costumes');
const el = await findByXpath('//button[@aria-label="Choose a Costume"]');
await driver.actions().mouseMove(el)
.perform();
await driver.sleep(500); // Wait for thermometer menu to come up
await clickXpath('//button[@aria-label="Paint"]');
const logs = await getLogs();
await expect(logs).toEqual([]);
});
test('Duplicating a costume', async () => {
await loadUri(uri);
await clickXpath('//button[@title="tryit"]');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment