Skip to content

Commit

Permalink
File Upload puzzle
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarkovtsev committed Jul 31, 2024
1 parent 69a8588 commit bda8088
Show file tree
Hide file tree
Showing 7 changed files with 171 additions and 1 deletion.
6 changes: 6 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ app.get('/alerts', function (req, res) {
})
})

app.get('/upload', function (req, res) {
res.render('Upload', {
title: 'File Upload'
})
})

app.get('/dynamictable', function (req, res) {

function genmetric(m)
Expand Down
89 changes: 89 additions & 0 deletions static/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions static/upload.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions static/upload.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/static/icon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>UI Test Automation Playground</title>
<script type="module" crossorigin src="/static/upload.js"></script>
<link rel="stylesheet" crossorigin href="/static/upload.css">
</head>
<body>
<div id="root"></div>
</body>
</html>
40 changes: 40 additions & 0 deletions static/upload.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion views/Home.pug
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,7 @@ html(lang="en")
a(href="/alerts") Alerts
p Accept alerts, confirmations and prompts
div(class="col-sm")
<span>&nbsp;</span>
h3
a(href="/upload") File Upload
p Upload files
include footer.html
18 changes: 18 additions & 0 deletions views/Upload.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
doctype html
html(lang="en")
include head.pug
body
include navbar.pug

section
div(class="container")
h3=title
p Modern web applications often include file upload functionality, enabling users to easily share and manage documents, images, and other types of files directly from their devices, enhancing user interaction and content management.
h4 Scenario
ul
li Attach a file via drag&drop.
li Attach a file using `Browse files` button
h4 Playground
iframe(src="/static/upload.html" width="800" height="500" frameBorder="0")

include footer.html

0 comments on commit bda8088

Please sign in to comment.