Skip to content
This repository was archived by the owner on Apr 25, 2024. It is now read-only.

Commit 9ec3e31

Browse files
authored
Merge pull request #1154 from creativecommons/develop
2 parents 66b4902 + 932b1ec commit 9ec3e31

30 files changed

+1168
-118
lines changed

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ module.exports = {
77
},
88
env: {
99
browser: true,
10+
'cypress/globals': true,
1011
},
1112
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
1213
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
1314
extends: ['plugin:vue/essential', 'airbnb-base', 'plugin:vue-a11y/base'],
1415
// required to lint *.vue files
15-
plugins: ['vue', 'vue-a11y'],
16+
plugins: ['vue', 'vue-a11y', 'cypress'],
1617
// check if imports actually resolve
1718
settings: {
1819
'import/resolver': {
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: End-to-end tests
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
jobs:
10+
cypress-run:
11+
runs-on: ubuntu-16.04
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v1
15+
# Install NPM dependencies, cache them correctly
16+
# and run all Cypress tests
17+
- name: Cypress run
18+
uses: cypress-io/github-action@v2
19+
with:
20+
config: baseUrl=https://ccsearch-dev.creativecommons.org

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ yarn-debug.log*
66
yarn-error.log*
77
/test/unit/coverage/
88
/test/e2e/reports/
9+
/test/e2e/screenshots
10+
/test/e2e/videos
911
/test/selenium-webdriver/geckodriver.log
1012
/test/selenium-webdriver/screenshots/*
1113
selenium-debug.log

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Code is linted with `eslint` and formatted with `prettier`. Linting and formatti
6565

6666
### Versioning
6767

68-
CC Search uses [CalVer](https://calver.org/) for version numbering, in the `YYYY.0M.Micro` format. `Micro` is bumped whenever there are multiple releases in a month, for example `2020.07.1` is the first release in July 2020, while `2020.07.2` is the second.
68+
CC Search uses [CalVer](https://calver.org/) for version numbering, in the `YYYY.M.Micro` format. This format is intentionally compatiable with NPM's `semver` parser. `Micro` is bumped whenever there are multiple releases in a month, for example `2020.07.1` is the first release in July 2020, while `2020.07.2` is the second.
6969

7070
## Deployment
7171

cypress.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"baseUrl": "http://localhost:8443",
3+
"integrationFolder": "test/e2e",
4+
"video": false
5+
}

cypress/plugins/index.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/* eslint-disable spaced-comment */
2+
/* eslint-disable no-unused-vars */
3+
/// <reference types="cypress" />
4+
// ***********************************************************
5+
// This example plugins/index.js can be used to load plugins
6+
//
7+
// You can change the location of this file or turn off loading
8+
// the plugins file with the 'pluginsFile' configuration option.
9+
//
10+
// You can read more here:
11+
// https://on.cypress.io/plugins-guide
12+
// ***********************************************************
13+
14+
// This function is called when a project is opened or re-opened (e.g. due to
15+
// the project's config changing)
16+
17+
/**
18+
* @type {Cypress.PluginConfig}
19+
*/
20+
module.exports = (on, config) => {
21+
// `on` is used to hook into various events Cypress emits
22+
// `config` is the resolved Cypress config
23+
}

cypress/support/commands.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// ***********************************************
2+
// This example commands.js shows you how to
3+
// create various custom commands and overwrite
4+
// existing commands.
5+
//
6+
// For more comprehensive examples of custom
7+
// commands please read more here:
8+
// https://on.cypress.io/custom-commands
9+
// ***********************************************
10+
//
11+
//
12+
// -- This is a parent command --
13+
// Cypress.Commands.add("login", (email, password) => { ... })
14+
//
15+
//
16+
// -- This is a child command --
17+
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
18+
//
19+
//
20+
// -- This is a dual command --
21+
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
22+
//
23+
//
24+
// -- This will overwrite an existing command --
25+
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })

cypress/support/index.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// ***********************************************************
2+
// This example support/index.js is processed and
3+
// loaded automatically before your test files.
4+
//
5+
// This is a great place to put global configuration and
6+
// behavior that modifies Cypress.
7+
//
8+
// You can change the location of this file or turn off
9+
// automatically serving support files with the
10+
// 'supportFile' configuration option.
11+
//
12+
// You can read more here:
13+
// https://on.cypress.io/configuration
14+
// ***********************************************************
15+
16+
// Import commands.js using ES2015 syntax:
17+
import './commands'
18+
19+
// Alternatively you can use CommonJS syntax:
20+
// require('./commands')

0 commit comments

Comments
 (0)