Skip to content

Commit

Permalink
Fix E2E tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
novalex committed Dec 6, 2020
1 parent 26097d0 commit 59cd143
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/e2e/HomePage.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@ test(
);

const addNewCommandText = 'Add new command';
const newCommandSelector = Selector('[data-tid="new-command"]');

const clickAddNewCommandLink = (t) =>
t.click(Selector('a').withExactText(addNewCommandText));

test(`should navigate to New Comand page with click on the "${addNewCommandText}" link`, async (t) => {
await clickAddNewCommandLink(t);
await t.expect(newCommandSelector().innerText).eql('');
await t.expect(Selector('header h1').innerText).eql('New Command');
});

test('should navigate to /new-command', async (t) => {
Expand All @@ -49,6 +48,6 @@ fixture`New Command Tests`
test('should go back to Home if back button clicked', async (t) => {
await t
.click('[data-tid="backButton"] > a')
.expect(Selector('[data-tid="container"]').visible)
.expect(Selector('[data-tid="commands"]').visible)
.ok();
});

0 comments on commit 59cd143

Please # to comment.