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

BUMPED: Electron to v19 #240

Merged
merged 26 commits into from
Nov 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
56b30b7
BUMPED: Electron to v19
warpdesign Jun 20, 2022
fdf6f1f
ADDED: GitHub actions config file
warpdesign Jun 21, 2022
07950f3
FIXED: GitHub actions syntax error
warpdesign Jun 21, 2022
e9ea9a8
FIXED: attempt to fix action script
warpdesign Jun 21, 2022
7ed1735
FIXED: one more attempt to fix build script
warpdesign Jun 21, 2022
9928d95
FIXED: even more attempt to fix build script
warpdesign Jun 21, 2022
b6dc1fb
FIXED: sigh.. another attempt to fix actions script
warpdesign Jun 21, 2022
caf7838
FIXED: even more and more attempt to fix build script
warpdesign Jun 21, 2022
0c7129e
FIXED: run server before starting cypress tests
warpdesign Jun 21, 2022
063f6b3
ADDED: jest-cli dev package, should fix win errors
warpdesign Jun 21, 2022
1421f31
FIXED: make windows tests optional until problems are sorted
warpdesign Jun 21, 2022
613809e
FIXED: attempt to fix npm install on Windows
warpdesign Jun 22, 2022
00b2ab8
FIXED: another attempt at fixing windows stalls
warpdesign Jun 22, 2022
b7a7ad0
FIXED: added missing html-webpack-plugin
warpdesign Jun 22, 2022
cdd121e
CLEANED-UP: github action steps
warpdesign Jun 22, 2022
037fbaf
FIXED: github actions, npm ci was using wrong working directory
warpdesign Jun 22, 2022
73dd76b
REVERTED: Electron to 18.x, fixes intertial broken on macos
warpdesign Jun 22, 2022
476d6c4
DISABLED: Windows tests until npm problems are sorted out
warpdesign Jun 24, 2022
dc99246
UPDATED: use https for custom mock-fs package, should fix random erro…
warpdesign Jun 24, 2022
81a177e
ADDED: cache for npm
warpdesign Jun 24, 2022
f3326c2
FIXED: attempt to fix git error when doing npm ci
warpdesign Jun 24, 2022
00c7733
FIXED: another attempt at fixing git/ssh error
warpdesign Jun 24, 2022
4a02df9
feat: upgraded to electron, webpack, switched to swc
Oct 25, 2022
b85c8ea
FIXED: upgraded production webpack config
Oct 26, 2022
629e5cb
UPDATED: Cypress & Webpack
Nov 8, 2022
334b87b
FIXED: missing @babel/runtime (needed by react-dnd)
Nov 8, 2022
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
42 changes: 42 additions & 0 deletions .github/workflows/github-actions-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Cypress & Jest CI
on: [push]
jobs:
test:
strategy:
fail-fast: false
matrix:
node-version: [14.x]
os: [ubuntu-latest, macos-latest]
experimental: [false]
# include:
# - os: windows-latest
# experimental: true
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
defaults:
run:
working-directory: ./e2e
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install node_modules
working-directory: ./
run: npm ci
- name: Install e2e node_modules
run: npm ci
- name: Build E2E version
run: npm run build
- name: Run & wait for server
run: npm run server & npx wait-on http://localhost:8080
- name: Cypress tests
run: npm run cypress:run --config video=false
- name: Integration tests
working-directory: ./
run: npm test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ dist-e2e/
.DS_Store
build/
e2e/build-e2e/
e2e/cypress/screenshots/
public
9 changes: 9 additions & 0 deletions .swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"jsc": {
"parser": {
"syntax": "typescript",
"tsx": true,
"decorators": true
}
}
}
10 changes: 10 additions & 0 deletions e2e/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConfig } from 'cypress';

export default defineConfig({
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
},
specPattern: 'cypress/e2e/**/*.spec.{js,jsx,ts,tsx}',
},
});
3 changes: 0 additions & 3 deletions e2e/cypress.json

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe('combo hotkeys', () => {
// no selection: triggering fake combo should not show toast message
cy.triggerFakeCombo('CmdOrCtrl+Shift+C');

cy.get(`.${Classes.TOAST}`).should('not.be.visible');
cy.get(`.${Classes.TOAST}`).should('not.exist');

cy.get('@copySelectedItemsPath').should('be.calledWith', caches[0], false);
});
Expand Down Expand Up @@ -120,7 +120,7 @@ describe('combo hotkeys', () => {

// wait for dialog to be closed otherwise
// it could still be visible in next it()
cy.get('.shortcutsDialog').should('not.be.visible');
cy.get('.shortcutsDialog').should('not.exist');
});

it('should open prefs dialog', () => {
Expand All @@ -133,7 +133,7 @@ describe('combo hotkeys', () => {

// wait for dialog to be closed otherwise
// it could still be visible in next it()
cy.get('.shortcutsDialog').should('not.be.visible');
cy.get('.shortcutsDialog').should('not.exist');
});

it('should reload file view', () => {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,15 @@ describe('toolbar', () => {
cy.get('#view_0 [data-cy-path]').invoke('val', '/').focus();
});

it('nav buttons are disabled', () => {
it('nav buttons should be disabled', () => {
cy.get('#view_0 [data-cy-backward]').should('be.disabled');
cy.get('#view_0 [data-cy-forward]').should('be.disabled');

cy.get('#view_1 [data-cy-backward]').should('be.disabled');
cy.get('#view_1 [data-cy-forward]').should('be.disabled');
});

it('type path and enter calls cd', () => {
cy.get('#view_0 [data-cy-path]').type('/other_folder{enter}');

cy.get('@stub_cd0').should('be.called');

cy.get('.data-cy-alert').should('be.visible').find('.bp3-button').click();
});

it('type path and escape clears path with previous value', () => {
it('should restore previous input value when typing a new path and pressing escape', () => {
cy.get('#view_0 [data-cy-path]').as('input').invoke('val').as('previous_value');

cy.get('@input').type('/sdfdsgsdg{esc}');
Expand All @@ -68,7 +60,7 @@ describe('toolbar', () => {
cy.get('@stub_cd0').should('not.be.called');
});

it('type non valid path should show alert then focus input', () => {
it('should show an alert then focus input when typing a non valid path', () => {
cy.get('#view_0 [data-cy-path]').type(':{enter}');

cy.get('.data-cy-alert').should('be.visible').find('.bp3-button').click();
Expand All @@ -78,14 +70,14 @@ describe('toolbar', () => {
cy.get('@stub_cd0').should('be.called');
});

it('path should get updated when fileState is updated', () => {
it('should update the paht when the fileState is updated', () => {
cy.window().then((win) => {
win.appState.winStates[0].views[0].caches[0].updatePath('/newPath');
cy.get('#view_0 [data-cy-path]').should('have.value', '/newPath');
});
});

it('clicking on reload should reload path', () => {
it('should reload path when clicking on reload button', () => {
cy.get('#view_0 .data-cy-reload').click();

cy.get('@stub_reload0').should('be.called');
Expand Down
3 changes: 3 additions & 0 deletions e2e/cypress/mocks/process.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ module.exports = {
chrome: 'cypress chrome',
electron: 'cypress electron',
},
env: {

}
};
18 changes: 0 additions & 18 deletions e2e/cypress/plugins/index.js

This file was deleted.

20 changes: 20 additions & 0 deletions e2e/cypress/support/e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// ***********************************************************
// This example support/e2e.ts is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands';

// Alternatively you can use CommonJS syntax:
// require('./commands')
Loading