Skip to content

Commit

Permalink
Add automated testing for expanded blob
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonardo Bressan Motyczka committed Aug 28, 2018
1 parent 458b7c7 commit c94cc81
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions e2e/automated.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,27 @@ describe('End to End tests', () => {
});
});
});

describe('expanded blob', () => {
it('should resolve after appending new blobs', async () => {
const url =
'https://github.com/OctoLinker/OctoLinker/pull/451/files#diff-b9cfc7f2cdf78a7f4b91a753d10865a2';
const targetUrl = 'https://github.com/benmosher/eslint-plugin-import';
const selector = '[data-line-number="45"] + td .octolinker-link';
const expandSelector = '[data-right-range="44-55"]';

await page.goto(url);

await page.click(expandSelector);

await page.waitForSelector(selector);

await Promise.all([
page.waitForNavigation(),
page.$eval(selector, el => el.click()),
]);

await expect(page.url()).toEqual(expect.stringMatching(targetUrl));
});
});
});

0 comments on commit c94cc81

Please sign in to comment.