Skip to content
Snippets Groups Projects
Unverified Commit def5898c authored by Paul Kaplan's avatar Paul Kaplan Committed by GitHub
Browse files

Merge pull request #1889 from paulkaplan/integration-tests-for-how-tos

Add a simple smoke test for the how-to library
parents 44bd1a30 7eebe9b3
Branches
Tags
No related merge requests found
......@@ -224,6 +224,7 @@ const MenuBar = props => (
</div>
<div className={styles.accountInfoWrapper}>
<div
aria-label="How-to Library"
className={classNames(styles.menuBarItem, styles.hoverable)}
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.
Please register or to comment