Skip to content

Commit

Permalink
Merge pull request 'Migrate to Vue3 and Pinia' (#7) from migrate-vue3…
Browse files Browse the repository at this point in the history
  • Loading branch information
Caleb Rogers committed Mar 19, 2024
2 parents a74a64b + 3526c8b commit 8403b8b
Show file tree
Hide file tree
Showing 37 changed files with 8,469 additions and 39,669 deletions.
15 changes: 15 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')

module.exports = {
root: true,
'extends': [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier/skip-formatting'
],
parserOptions: {
ecmaVersion: 'latest'
}
}
8 changes: 8 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"semi": true,
"tabWidth": 2,
"singleQuote": true,
"printWidth": 100,
"trailingComma": "none"
}
1 change: 1 addition & 0 deletions env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
15 changes: 15 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://unpkg.com/[email protected]/css/nes.min.css" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css?family=Press+Start+2P" rel="stylesheet">
<title>Guess Which Game!</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
153 changes: 153 additions & 0 deletions nightwatch.conf.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
//
// Refer to the online docs for more details:
// https://nightwatchjs.org/guide/configuration/nightwatch-configuration-file.html
//
// _ _ _ _ _ _ _
// | \ | |(_) | | | | | | | |
// | \| | _ __ _ | |__ | |_ __ __ __ _ | |_ ___ | |__
// | . ` || | / _` || '_ \ | __|\ \ /\ / / / _` || __| / __|| '_ \
// | |\ || || (_| || | | || |_ \ V V / | (_| || |_ | (__ | | | |
// \_| \_/|_| \__, ||_| |_| \__| \_/\_/ \__,_| \__| \___||_| |_|
// __/ |
// |___/
//

module.exports = {
// An array of folders (excluding subfolders) where your tests are located;
// if this is not specified, the test source must be passed as the second argument to the test runner.
src_folders: [],

// See https://nightwatchjs.org/guide/concepts/page-object-model.html
page_objects_path: [],

// See https://nightwatchjs.org/guide/extending-nightwatch/adding-custom-commands.html
custom_commands_path: [],

// See https://nightwatchjs.org/guide/extending-nightwatch/adding-custom-assertions.html
custom_assertions_path: [],

// See https://nightwatchjs.org/guide/extending-nightwatch/adding-plugins.html
plugins: ['@nightwatch/vue'],

// See https://nightwatchjs.org/guide/concepts/test-globals.html#external-test-globals
globals_path: '',

vite_dev_server: {
start_vite: true,
port: process.env.CI ? 4173 : 5173
},

webdriver: {},

test_workers: {
enabled: true,
workers: 'auto'
},

test_settings: {
default: {
disable_error_log: false,
launch_url: `http://localhost:${process.env.CI ? '4173' : '5173'}`,

screenshots: {
enabled: false,
path: 'screens',
on_failure: true
},

desiredCapabilities: {
browserName: 'firefox'
},

webdriver: {
start_process: true,
server_path: ''
}
},

safari: {
desiredCapabilities: {
browserName: 'safari',
alwaysMatch: {
acceptInsecureCerts: false
}
},
webdriver: {
start_process: true,
server_path: ''
}
},

firefox: {
desiredCapabilities: {
browserName: 'firefox',
alwaysMatch: {
acceptInsecureCerts: true,
'moz:firefoxOptions': {
args: [
// '-headless',
// '-verbose'
]
}
}
},
webdriver: {
start_process: true,
server_path: '',
cli_args: [
// very verbose geckodriver logs
// '-vv'
]
}
},

chrome: {
desiredCapabilities: {
browserName: 'chrome',
'goog:chromeOptions': {
// More info on Chromedriver: https://sites.google.com/a/chromium.org/chromedriver/
//
// w3c:false tells Chromedriver to run using the legacy JSONWire protocol (not required in Chrome 78)
w3c: true,
args: [
//'--no-sandbox',
//'--ignore-certificate-errors',
//'--allow-insecure-localhost',
//'--headless'
]
}
},

webdriver: {
start_process: true,
server_path: '',
cli_args: [
// --verbose
]
}
},

edge: {
desiredCapabilities: {
browserName: 'MicrosoftEdge',
'ms:edgeOptions': {
w3c: true,
// More info on EdgeDriver: https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium/capabilities-edge-options
args: [
//'--headless'
]
}
},

webdriver: {
start_process: true,
// Download msedgedriver from https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium/
// and set the location below:
server_path: '',
cli_args: [
// --verbose
]
}
}
}
}
13 changes: 13 additions & 0 deletions nightwatch/nightwatch.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { NightwatchCustomAssertions, NightwatchCustomCommands } from 'nightwatch'

declare module 'nightwatch' {
interface NightwatchCustomAssertions {
// Add your custom assertions' types here
// elementHasCount: (selector: string, count: number) => NightwatchBrowser
}

interface NightwatchCustomCommands {
// Add your custom commands' types here
// strictClick: (selector: string) => NightwatchBrowser
}
}
20 changes: 20 additions & 0 deletions nightwatch/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"extends": "@tsconfig/node20/tsconfig.json",
"compilerOptions": {
"composite": true,
"noEmit": true,
"tsBuildInfoFile": "../node_modules/.tmp/tsconfig.nightwatch.tsbuildinfo",

"target": "ESNext",
"module": "es2022",
"moduleResolution": "node",
"rootDir": "../",
"lib": ["ESNext", "dom"],
"types": ["nightwatch"]
},
"include": ["../node_modules/@nightwatch/**/*", "../src/**/*", "../tests/e2e/**/*"],
"ts-node": {
"transpileOnly": true
},
"files": ["nightwatch.d.ts"]
}
Loading

0 comments on commit 8403b8b

Please sign in to comment.