diff --git a/.gitpod.yml b/.gitpod.yml index 4162816c..8c1e3d19 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -2,6 +2,49 @@ image: file: .gitpod.Dockerfile +# Run these for the cypress tests: + +# export CHROME_VERSION=119.0.6045.199-1 +# export FIREFOX_VERSION=120.0 + +# # sudo apt-get update +# sudo apt-get install -y \ +# libgtk2.0-0 \ +# libgtk-3-0 +# sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq \ +# libgbm-dev \ +# libnotify-dev +# sudo apt-get install -y \ +# libgconf-2-4 \ +# libnss3 \ +# libxss1 +# sudo apt-get install -y \ +# libasound2 \ +# libxtst6 \ +# xauth \ +# libu2f-udev \ +# xvfb + +# sudo wget -O /usr/src/google-chrome-stable_current_amd64.deb "http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb" +# sudo dpkg -i /usr/src/google-chrome-stable_current_amd64.deb + +# sudo apt-get install -f -y && \ +# sudo rm -f /usr/src/google-chrome-stable_current_amd64.deb + +# google-chrome --version +# sudo apt-get install mplayer -y +# sudo wget --no-verbose -O /tmp/firefox.tar.bz2 https://download-installer.cdn.mozilla.net/pub/firefox/releases/$FIREFOX_VERSION/linux-x86_64/en-US/firefox-$FIREFOX_VERSION.tar.bz2 +# sudo tar -C /opt -xjf /tmp/firefox.tar.bz2 \ +# && sudo rm /tmp/firefox.tar.bz2 \ +# && sudo ln -fs /opt/firefox/firefox /usr/bin/firefox +# echo " node version: $(node -v) \n" \ +# "npm version: $(npm -v) \n" \ +# "yarn version: $(yarn -v) \n" \ +# "debian version: $(cat /etc/debian_version) \n" \ +# "Chrome version: $(google-chrome --version) \n" \ +# "Firefox version: $(firefox --version) \n" \ +# "git version: $(git --version) \n" \ +# "whoami: $(whoami) \n" tasks: - init: npm install && npm run build:production command: printf '\n\n 🎉🎉 The plugin is available in the Explorer 🎉🎉\n\nRight-click the .vsix file and click "Install Extension VSIX" to test it.\n\nRun "npm test" to run tests\n' diff --git a/cypress.config.ts b/cypress.config.ts new file mode 100644 index 00000000..3b766fed --- /dev/null +++ b/cypress.config.ts @@ -0,0 +1,5 @@ +import { defineConfig } from 'cypress' + +export default defineConfig({ + e2e: { baseUrl: null } +}) \ No newline at end of file diff --git a/cypress.json b/cypress.json deleted file mode 100644 index 0967ef42..00000000 --- a/cypress.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/cypress/integration/cnxml-preview-spec.ts b/cypress/e2e/cnxml-preview-spec.cy.ts similarity index 100% rename from cypress/integration/cnxml-preview-spec.ts rename to cypress/e2e/cnxml-preview-spec.cy.ts diff --git a/cypress/integration/image-upload-spec.ts b/cypress/e2e/image-upload-spec.cy.ts similarity index 100% rename from cypress/integration/image-upload-spec.ts rename to cypress/e2e/image-upload-spec.cy.ts diff --git a/cypress/integration/toc-editor-spec.ts b/cypress/e2e/toc-editor-spec.cy.ts similarity index 100% rename from cypress/integration/toc-editor-spec.ts rename to cypress/e2e/toc-editor-spec.cy.ts diff --git a/cypress/support/index.ts b/cypress/support/e2e.ts similarity index 100% rename from cypress/support/index.ts rename to cypress/support/e2e.ts diff --git a/package.json b/package.json index d0084cd1..b6b1e633 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,8 @@ "lint": "eslint . --ext ts,js,jsx,tsx,json", "lint:fix": "npm run lint -- --fix", "pretest:cypress": "npm run build && ./scripts/pre-cypress.bash", - "test:cypress": "cypress run --quiet --config-file ./cypress.json", + "test:cypress": "npm run test:cypress:only", + "test:cypress:only": "cypress run --quiet --config-file ./cypress.config.ts", "pretest:unit": "jest --clearCache", "test:unit": "jest --coverage --coverageDirectory ./.nyc_output/", "test:unit:watch": "npm run test:unit -- --watch --updateSnapshot", @@ -41,13 +42,7 @@ }, "activationEvents": [ "onLanguage:xml", - "onCommand:openstax.showPreviewToSide", - "onCommand:openstax.showTocEditor", - "onCommand:openstax.showImageManager", - "onCommand:openstax.pushContent", - "onCommand:openstax.generateReadme", - "onView:tocTrees", - "onCommand:openstax.validateContent" + "onCommand:openstax.showImageManager" ], "contributes": { "commands": [ diff --git a/snapshots.js b/snapshots.js index 83cf7975..5de89150 100644 --- a/snapshots.js +++ b/snapshots.js @@ -1,5 +1,5 @@ module.exports = { - "__version": "9.4.1", + "__version": "13.6.0", "toc-editor Webview Tests": { "drag-n-drop": { "allows dnd from uneditable to editable": {