Skip to content

Commit

Permalink
test: update tests to new login fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
jperl committed Jul 9, 2020
1 parent ed4da67 commit 062ad37
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`buildClickSteps builds one click per group of mousedown/click events 1`
Array [
0,
2,
29,
43,
]
`;

Expand Down
8 changes: 3 additions & 5 deletions test/build-workflow/buildClickSteps.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,14 @@ describe('buildClickSteps', () => {
it('skips click triggered by Enter', () => {
const steps = buildClickSteps(loginEvents);

// check there is not a click on the password
expect(steps.length).toEqual(3);

// click on login link
expect(steps[0].event.target.attrs.href).toEqual('/login');

// click on initial input
expect(steps[1].event.target.attrs.id).toEqual('username');
expect(steps[1].event.selector).toEqual('#username');

// click logout
expect(steps[2].event.selector).toEqual('text="Log out"');
expect(steps[2].event.selector).toEqual('text=Log out');
});

it('skips click on select', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/create-code/__snapshots__/CodeReconciler.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`CodeReconciler.reconcile inserts new expressions 1`] = `
"await page.click('text=\\"Log in\\"');
"await page.click(\\"p\\");
// 🐺 create code here"
`;

Expand Down

0 comments on commit 062ad37

Please sign in to comment.