Skip to content
Draft
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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Playwright
test-results
playwright-report

# Editor directories and files
.idea
.codex
*.suo
*.ntvs*
*.njsproj
Expand Down
100 changes: 76 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"start": "quasar serve dist/spa -p 8080",
"dev": "quasar dev",
"build": "quasar build",
"test": "echo \"No test specified\" && exit 0"
"test": "playwright test"
},
"dependencies": {
"@quasar/extras": "^1.16.7",
Expand All @@ -28,6 +28,7 @@
},
"devDependencies": {
"@intlify/vite-plugin-vue-i18n": "^3.3.1",
"@playwright/test": "^1.59.1",
"@quasar/app-vite": "^1.6.2",
"autoprefixer": "^10.4.2",
"postcss": "^8.4.31",
Expand Down
25 changes: 25 additions & 0 deletions playwright.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const {defineConfig, devices} = require('@playwright/test')

module.exports = defineConfig({
testDir: './test',
timeout: 30000,
expect: {
timeout: 10000
},
use: {
baseURL: 'http://localhost:8080',
trace: 'on-first-retry'
},
projects: [
{
name: 'chromium',
use: {...devices['Desktop Chrome']}
}
],
webServer: {
command: 'npx quasar dev -p 8080',
url: 'http://localhost:8080',
reuseExistingServer: true,
timeout: 120000
}
})
14 changes: 11 additions & 3 deletions src/boot/saas.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,15 @@ var saas = {
return data
},

createInstance: async function (instanceType) {
createInstance: async function (instanceType, paymentPlan = {}) {
return axios({
method: 'POST',
url: this.url('/instance'),
withCredentials: true,
data: {
instance_type: instanceType
instance_type: instanceType,
payment_plan_tier: paymentPlan.tier || undefined,
payment_plan_interval: paymentPlan.interval || undefined
}
})
},
Expand All @@ -133,7 +135,13 @@ var saas = {

return response
},

getPricing: async function () {
return axios({
method: 'GET',
url: this.url('/pricing'),
withCredentials: true
})
},
updateInstance: function (id, action) {
return axios({
method: 'PUT',
Expand Down
Loading