Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
refactor: update code to Vue 3 and refresh test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Ignacio Anaya committed Jun 10, 2021
1 parent 5215e22 commit 97d94f2
Show file tree
Hide file tree
Showing 87 changed files with 21,543 additions and 5,222 deletions.
7 changes: 7 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
preset: '@vue/cli-plugin-unit-jest',
transform: {
'^.+\\.vue$': 'vue-jest',
},
setupFilesAfterEnv: ['./jest.setup.js'],
}
1 change: 1 addition & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '@testing-library/jest-dom'
21,209 changes: 16,054 additions & 5,155 deletions package-lock.json

Large diffs are not rendered by default.

26 changes: 23 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,43 @@
"scripts": {
"serve": "vue-cli-service build --mode development --watch",
"build": "vue-cli-service build",
"test:unit": "vue-cli-service test:unit __tests__/.*.spec.js",
"lint": "vue-cli-service lint"
},
"dependencies": {
"@medv/finder": "1.1.2",
"@tailwindcss/postcss7-compat": "2.0.2",
"@vueuse/core": "4.0.8",
"autoprefixer": "9",
"core-js": "3.6.5",
"vue": "3.0.0"
"postcss": "7",
"tailwindcss": "npm:@tailwindcss/postcss7-compat@2.0.2",
"vue": "3.0.6",
"vue3-highlightjs": "1.0.5"
},
"devDependencies": {
"@testing-library/jest-dom": "5.12.0",
"@vue/cli-plugin-babel": "4.5.0",
"@vue/cli-plugin-eslint": "4.5.0",
"@vue/cli-plugin-unit-jest": "4.5.12",
"@vue/cli-service": "4.5.0",
"@vue/compiler-sfc": "3.0.0",
"@vue/eslint-config-prettier": "6.0.0",
"@vue/test-utils": "2.0.0-rc.6",
"babel-eslint": "10.1.0",
"eslint": "6.7.2",
"eslint-plugin-prettier": "3.1.3",
"eslint-plugin-vue": "7.0.0-0",
"eslint-plugin-vue": "7.10.0",
"jest": "26.6.3",
"jest-vue-preprocessor": "1.7.1",
"node-sass": "5.0.0",
"playwright": "1.10.0",
"prettier": "1.19.1",
"vue-cli-plugin-browser-extension": "0.25.1"
"puppeteer": "9.0.0",
"sass-loader": "10.1.1",
"typescript": "3.9.3",
"vue-cli-plugin-browser-extension": "0.25.1",
"vue-cli-plugin-tailwind": "2.0.6",
"vue-jest": "5.0.0-alpha.9"
}
}
6 changes: 6 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {}
}
};
6 changes: 0 additions & 6 deletions public copy/_locales/en/messages.json

This file was deleted.

12 changes: 0 additions & 12 deletions public copy/browser-extension.html

This file was deleted.

Binary file removed public copy/favicon.ico
Binary file not shown.
Binary file removed public copy/icons/128.png
Binary file not shown.
Binary file removed public copy/icons/16.png
Binary file not shown.
Binary file removed public copy/icons/19.png
Binary file not shown.
Binary file removed public copy/icons/38.png
Binary file not shown.
Binary file removed public copy/icons/48.png
Binary file not shown.
17 changes: 0 additions & 17 deletions public copy/index.html

This file was deleted.

Binary file modified public/icons/128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/icons/16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/icons/19.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/icons/38.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/icons/48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/icon-black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/icon-green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/icon_rec.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/icon_wait.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/__e2e-tests__/build.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import puppeteer from "puppeteer";
import { launchPuppeteerWithExtension } from "./helpers";

describe("install", () => {
test("it installs the extension", async () => {
const browser = await launchPuppeteerWithExtension(puppeteer);
expect(browser).toBeTruthy();
browser.close();
}, 5000);
});
30 changes: 30 additions & 0 deletions src/__e2e-tests__/helpers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import path from "path";
import { scripts } from "../../package.json";
const util = require("util");
const exec = util.promisify(require("child_process").exec);

const extensionPath = path.join(__dirname, "../../dist");

export const launchPuppeteerWithExtension = function(puppeteer) {
const options = {
headless: false,
ignoreHTTPSErrors: true,
devtools: true,
args: [
`--disable-extensions-except=${extensionPath}`,
`--load-extension=${extensionPath}`,
"--no-sandbox",
"--disable-setuid-sandbox"
]
};

if (process.env.CI) {
options.executablePath = process.env.PUPPETEER_EXEC_PATH; // Set by docker on github actions
}

return puppeteer.launch(options);
};

export const runBuild = function() {
return exec(scripts.build);
};
252 changes: 252 additions & 0 deletions src/assets/images/Desert.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/context_menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 97d94f2

Please sign in to comment.