Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Cleanup CI dependencies and Cypress #1836

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Run HTML5 Validator
run: npm run lint:html

# - name: Run Cypress tests
# run: |
# bundle exec jekyll serve --detach
# npm run cypress:run
- name: Run Cypress tests
run: |
bundle exec jekyll serve --detach
npm run cypress:run
8 changes: 8 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { defineConfig } from 'cypress';

export default defineConfig({
e2e: {
specPattern: 'cypress/integration/**/*.spec.js',
defaultCommandTimeout: 10000,
},
});
3 changes: 0 additions & 3 deletions cypress.json

This file was deleted.

1 change: 0 additions & 1 deletion cypress/integration/unit-tests/code.spec.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
/// <reference types="Cypress" />
/* global cy, context, it */

context('Open Source Code', () => {

Check failure on line 3 in cypress/integration/unit-tests/code.spec.js

View workflow job for this annotation

GitHub Actions / build

'context' is not defined
it('Loads the English page', () => {

Check failure on line 4 in cypress/integration/unit-tests/code.spec.js

View workflow job for this annotation

GitHub Actions / build

'it' is not defined
cy.visit('http://localhost:4000/ore-ero/en/open-source-codes.html');

Check failure on line 5 in cypress/integration/unit-tests/code.spec.js

View workflow job for this annotation

GitHub Actions / build

'cy' is not defined
cy.get('#wb-cont').contains('Open Source Code');

Check failure on line 6 in cypress/integration/unit-tests/code.spec.js

View workflow job for this annotation

GitHub Actions / build

'cy' is not defined
});

it('Dynamically filters on the English page', () => {

Check failure on line 9 in cypress/integration/unit-tests/code.spec.js

View workflow job for this annotation

GitHub Actions / build

'it' is not defined
cy.visit('http://localhost:4000/ore-ero/en/open-source-codes.html');

Check failure on line 10 in cypress/integration/unit-tests/code.spec.js

View workflow job for this annotation

GitHub Actions / build

'cy' is not defined
cy.get('#dataset-filter_filter').find('input').type('youcanbenefit');

Check failure on line 11 in cypress/integration/unit-tests/code.spec.js

View workflow job for this annotation

GitHub Actions / build

'cy' is not defined

cy.get('#dataset-filter')

Check failure on line 13 in cypress/integration/unit-tests/code.spec.js

View workflow job for this annotation

GitHub Actions / build

'cy' is not defined
.find('tbody>tr')
.first()
.find('td>a')
Expand All @@ -19,8 +18,8 @@
.contains('YouCanBenefit');
});

it('Loads the French page', () => {

Check failure on line 21 in cypress/integration/unit-tests/code.spec.js

View workflow job for this annotation

GitHub Actions / build

'it' is not defined
cy.visit('http://localhost:4000/ore-ero/fr/codes-source-ouverts.html');

Check failure on line 22 in cypress/integration/unit-tests/code.spec.js

View workflow job for this annotation

GitHub Actions / build

'cy' is not defined
cy.get('#wb-cont').contains('Code Source Ouvert');
});

Expand Down
1 change: 0 additions & 1 deletion cypress/integration/unit-tests/deep-object.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/// <reference types="Cypress" />
/* global cy, context, it, before, expect */

context('deep-object.js', () => {
const obj1 = {
Expand Down
1 change: 0 additions & 1 deletion cypress/integration/unit-tests/home.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/// <reference types="Cypress" />
/* global cy, context, it */

context('Home', () => {
it('Loads the English page', () => {
Expand Down
1 change: 0 additions & 1 deletion cypress/integration/unit-tests/partnership.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/// <reference types="Cypress" />
/* global cy, context, it */

context('Partnerships', () => {
it('Loads the English page', () => {
Expand Down
1 change: 0 additions & 1 deletion cypress/integration/unit-tests/software-en-date.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/// <reference types="Cypress" />
/* global cy, context, it, before, expect */

context('date_func.js', () => {
const now = new Date();
Expand Down
1 change: 0 additions & 1 deletion cypress/integration/unit-tests/software.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/// <reference types="Cypress" />
/* global cy, context, it */

context('Open Source Software', () => {
it('Loads the English page', () => {
Expand Down
18 changes: 0 additions & 18 deletions cypress/plugins/index.js

This file was deleted.

2 changes: 1 addition & 1 deletion cypress/support/index.js → cypress/support/e2e.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ***********************************************************
// This example support/index.js is processed and
// This example support/e2e.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
Expand Down
20 changes: 19 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import globals from 'globals';
import js from '@eslint/js';
import cypress from 'eslint-plugin-cypress/flat'

export default [
js.configs.recommended,
Expand All @@ -22,11 +23,28 @@ export default [
},
},
{
files: ['cypress/**', '**/*.mjs'],
files: ['**/*.mjs'],

languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
},
{
...cypress.configs.recommended,
files: ['cypress/', 'cypress.config.js'],
// plugins: {
// cypress: cypress,
// },
// rules: {
// ...cypress.configs.recommended.rules,
// },
// languageOptions: {
// globals: {
// ...cypress.plugins.globals,
// },
// ecmaVersion: 'latest',
// sourceType: 'module',
// },
},
];
Loading
Loading