Skip to content

Commit 72ffcba

Browse files
committed
Added example test
0 parents  commit 72ffcba

6 files changed

Lines changed: 79 additions & 0 deletions

File tree

.github/workflows/node.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Node
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- name: Use Node.js 15
14+
uses: actions/setup-node@v1
15+
with:
16+
node-version: 15.x
17+
18+
- name: Get dependencies
19+
run: |
20+
npm install
21+
22+
- name: Create ZIP file
23+
run: |
24+
zip -r EndToEndTest.zip . -x .git/\* .github/\* .gitignore
25+
26+
- name: Create Release
27+
id: create_release
28+
uses: actions/create-release@v1
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
with:
32+
tag_name: 0.0.${{ github.run_number }}
33+
release_name: Release 0.0.${{ github.run_number }}
34+
draft: false
35+
prerelease: false
36+
37+
- name: Upload Release Asset
38+
id: upload-release-asset
39+
uses: actions/upload-release-asset@v1
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
with:
43+
upload_url: ${{ steps.create_release.outputs.upload_url }}
44+
asset_path: EndToEndTest.zip
45+
asset_name: EndToEndTest.0.0.0.${{ github.run_number }}.zip
46+
asset_content_type: application/zip

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM cypress/included:6.4.0
2+
RUN apt-get update; apt-get install -y libicu63
3+
RUN npm install -g inline-assets
4+
ENTRYPOINT []

cypress.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"baseUrl": "http://40.122.170.98/index.html",
3+
"reporter": "mochawesome",
4+
"reporterOptions": {
5+
"charts": true,
6+
"overwrite": false,
7+
"html": true,
8+
"json": false,
9+
"reportDir": "."
10+
}
11+
}

cypress/integration/sample_spec.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
describe('Random Quotes', () => {
2+
it('Can refresh', () => {
3+
cy.get('.refreshQuote').click()
4+
cy.wait(1000)
5+
cy.get('.quoteCount').contains('2')
6+
})
7+
})

package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "cypress-test",
3+
"version": "0.0.1",
4+
"description": "A simple cypress test",
5+
"dependencies": {
6+
"mochawesome-merge": "^4.2.0",
7+
"mochawesome": "^6.2.1",
8+
"mocha": "^8.2.1"
9+
}
10+
}

0 commit comments

Comments
 (0)