Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
mat2-quasar-frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jfriedli
mat2-quasar-frontend
Commits
eb80f57a
Verified
Commit
eb80f57a
authored
5 years ago
by
jfriedli
Browse files
Options
Downloads
Patches
Plain Diff
preparing test
parent
01d3107a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!4
Resolve "Add File Restrictions"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+6
-0
6 additions, 0 deletions
README.md
test/cypress/fixtures/not-supported.yml
+3
-0
3 additions, 0 deletions
test/cypress/fixtures/not-supported.yml
test/cypress/integration/home/init.spec.js
+22
-1
22 additions, 1 deletion
test/cypress/integration/home/init.spec.js
with
31 additions
and
1 deletion
README.md
+
6
−
0
View file @
eb80f57a
...
...
@@ -17,3 +17,9 @@ for production builds. If you use the docker environment
this is customizable in the
`docker-compose.yml`
file.
If none of these are set it will default to
`http://localhost:5000/`
.
Make sure to have slash at the end ;)
## E2E Tests
Run the E2E tests:
`quasar test --e2e cypress`
.
We use the cypress.io framework for testing.
The responses from the backend are mocked so it's not
fully E2E.
This diff is collapsed.
Click to expand it.
test/cypress/fixtures/not-supported.yml
0 → 100644
+
3
−
0
View file @
eb80f57a
some
:
random
:
yaml
:
'
testing'
This diff is collapsed.
Click to expand it.
test/cypress/integration/home/init.spec.js
+
22
−
1
View file @
eb80f57a
...
...
@@ -11,11 +11,17 @@ describe('Landing', () => {
describe
(
'
Upload page tests
'
,
()
=>
{
beforeEach
(()
=>
{
cy
.
server
()
cy
.
visit
(
'
/
'
)
})
it
(
'
allows uploading a file
'
,
()
=>
{
cy
.
server
()
cy
.
route
({
method
:
'
GET
'
,
url
:
'
/api/extension
'
,
response
:
[
'
.png
'
,
'
.jpg
'
]
}).
as
(
'
supportedExtensions
'
)
cy
.
route
({
method
:
'
POST
'
,
url
:
'
/api/upload
'
,
...
...
@@ -33,6 +39,8 @@ describe('Upload page tests', () => {
const
fileName
=
'
test-image.png
'
cy
.
wait
(
'
@supportedExtensions
'
)
cy
.
fixture
(
fileName
).
then
(
fileContent
=>
{
cy
.
get
(
'
.uppy-Dashboard-dropFilesTitle
'
).
upload
(
{
fileContent
,
fileName
,
mimeType
:
'
image/png
'
},
...
...
@@ -55,4 +63,17 @@ describe('Upload page tests', () => {
cy
.
get
(
'
.q-item__section a
'
)
.
should
(
'
have.attr
'
,
'
href
'
).
and
(
'
include
'
,
'
test-image.cleaned.png
'
)
})
it
(
'
rejects not supported file extensions
'
,
()
=>
{
const
fileName
=
'
not-supported.yml
'
cy
.
fixture
(
fileName
).
then
(
fileContent
=>
{
cy
.
get
(
'
.uppy-Dashboard-dropFilesTitle
'
).
upload
(
{
fileContent
,
fileName
,
mimeType
:
'
image/png
'
},
{
subjectType
:
'
drag-n-drop
'
}
)
})
cy
.
get
(
"
.uppy-Informer
"
).
contains
(
"
You can only upload: .asc, .avi
"
)
})
})
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment