mirror of
https://github.com/MontFerret/ferret.git
synced 2024-12-14 11:23:02 +02:00
63dfcdeefd
* Fixed dot notation for HTML elements
29 lines
2.9 KiB
Plaintext
29 lines
2.9 KiB
Plaintext
LET url = @dynamic
|
|
LET doc = DOCUMENT(url, true)
|
|
|
|
LET expected = `<!DOCTYPE html><html lang="en"><head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
|
<title>Ferret E2E SPA</title>
|
|
<meta name="description" content="">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
|
|
<link rel="stylesheet" href="index.css">
|
|
</head>
|
|
<body class="text-center">
|
|
<div id="root"><div id="layout"><nav class="navbar navbar-expand-md navbar-dark bg-dark mb-4" id="navbar"><a class="navbar-brand active" aria-current="page" href="/">Ferret</a><button class="navbar-toggler" type="button"><span class="navbar-toggler-icon"></span></button><div class="collapse navbar-collapse"><ul class="navbar-nav mr-auto"><li class="nav-item"><a class="nav-link" href="/forms">Forms</a></li><li class="nav-item"><a class="nav-link" href="/navigation">Navigation</a></li><li class="nav-item"><a class="nav-link" href="/events">Events</a></li></ul></div></nav><main class="container"><div class="jumbotron" data-type="page" id="index"><div><h1>Welcome to Ferret E2E test page!</h1></div><div><p class="lead">It has several pages for testing different possibilities of the library</p></div></div></main></div></div>
|
|
<script src="https://unpkg.com/react@16.6.1/umd/react.production.min.js"></script>
|
|
<script src="https://unpkg.com/react-dom@16.6.1/umd/react-dom.production.min.js"></script>
|
|
<script src="https://unpkg.com/history@4.7.2/umd/history.min.js"></script>
|
|
<script src="https://unpkg.com/react-router@4.3.1/umd/react-router.js"></script>
|
|
<script src="https://unpkg.com/react-router-dom@4.3.1/umd/react-router-dom.js"></script>
|
|
<script src="index.js" type="module"></script>
|
|
|
|
|
|
</body></html>`
|
|
LET actual = INNER_HTML(doc)
|
|
|
|
LET r1 = '(\s|\")'
|
|
LET r2 = '(\n|\s|\")'
|
|
|
|
RETURN EXPECT(REGEXP_REPLACE(expected, r1, ''), REGEXP_REPLACE(TRIM(actual), r2, '')) |