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

Add a simple smoke test for the how-to library

parent f32399d3
No related branches found
No related tags found
No related merge requests found
...@@ -224,6 +224,7 @@ const MenuBar = props => ( ...@@ -224,6 +224,7 @@ const MenuBar = props => (
</div> </div>
<div className={styles.accountInfoWrapper}> <div className={styles.accountInfoWrapper}>
<div <div
aria-label="How-to Library"
className={classNames(styles.menuBarItem, styles.hoverable)} className={classNames(styles.menuBarItem, styles.hoverable)}
onClick={props.onOpenTipLibrary} onClick={props.onOpenTipLibrary}
> >
......
import path from 'path';
import SeleniumHelper from '../helpers/selenium-helper';
const {
clickText,
clickXpath,
getDriver,
getLogs,
loadUri
} = new SeleniumHelper();
const uri = path.resolve(__dirname, '../../build/index.html');
let driver;
describe('Working with the how-to library', () => {
beforeAll(() => {
driver = getDriver();
});
afterAll(async () => {
await driver.quit();
});
test('Choosing a how-to', async () => {
await loadUri(uri);
await clickXpath('//button[@title="tryit"]');
await clickText('Costumes');
await clickXpath('//*[@aria-label="How-to Library"]');
await clickText('Say hello'); // Modal should close
await clickText('Add a new sprite'); // Make sure first card appears
const logs = await getLogs();
await expect(logs).toEqual([]);
});
// @todo navigating cards, etc.
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment