Skip to content

Commit

Permalink
update: tests added
Browse files Browse the repository at this point in the history
  • Loading branch information
Bayheck committed May 10, 2024
1 parent fcdc270 commit 43e737b
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/functional/fixtures/regression/gh-8179/pages/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>gh-8179</title>
<style>
.main {
width: 300px;
}
</style>
</head>
<body>
<div class="main">
This here link will take you to the
<a href="success.html">success page</a>.
</div>
</body>
</html>
10 changes: 10 additions & 0 deletions test/functional/fixtures/regression/gh-8179/pages/success.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Title</title>
</head>
<body>
<h1>success</h1>
</body>
</html>
5 changes: 5 additions & 0 deletions test/functional/fixtures/regression/gh-8179/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
describe('[Regression](GH-8179)', function () {
it('Should click on a two-word link split over two lines', function () {
return runTests('testcafe-fixtures/index.js');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Selector } from 'testcafe';

fixture`GH-8179 - Should click on a two-word link split over two lines`
.page`http://localhost:3000/fixtures/regression/gh-8179/pages/index.html`;

test('Click on a split link', async t => {
await t
.click('.main a')
.expect(Selector('h1').innerText).eql('success');
});

0 comments on commit 43e737b

Please sign in to comment.