瀏覽代碼

test: multiple cypress fixes

version-14
Sagar Vora 4 年之前
父節點
當前提交
c8763859ae
共有 3 個文件被更改,包括 8 次插入8 次删除
  1. +0
    -3
      cypress/integration/relative_time_filters.js
  2. +1
    -1
      cypress/integration/table_multiselect.js
  3. +7
    -4
      frappe/commands/utils.py

+ 0
- 3
cypress/integration/relative_time_filters.js 查看文件

@@ -1,7 +1,4 @@
context('Relative Timeframe', () => {
beforeEach(() => {
cy.login();
});
before(() => {
cy.login();
cy.visit('/app/website');


+ 1
- 1
cypress/integration/table_multiselect.js 查看文件

@@ -1,5 +1,5 @@
context('Table MultiSelect', () => {
beforeEach(() => {
before(() => {
cy.login();
});



+ 7
- 4
frappe/commands/utils.py 查看文件

@@ -11,7 +11,7 @@ import click
import frappe
from frappe.commands import get_site, pass_context
from frappe.exceptions import SiteNotSpecifiedError
from frappe.utils import get_bench_path, update_progress_bar
from frappe.utils import get_bench_path, update_progress_bar, cint


@click.command('build')
@@ -567,11 +567,14 @@ def run_ui_tests(context, app, headless=False):

node_bin = subprocess.getoutput("npm bin")
cypress_path = "{0}/cypress".format(node_bin)
plugin_path = "{0}/cypress-file-upload".format(node_bin)
plugin_path = "{0}/../cypress-file-upload".format(node_bin)

# check if cypress in path...if not, install it.
if not (os.path.exists(cypress_path) or os.path.exists(plugin_path)) \
or not subprocess.getoutput("npm view cypress version").startswith("6."):
if not (
os.path.exists(cypress_path)
and os.path.exists(plugin_path)
and cint(subprocess.getoutput("npm view cypress version")[:1]) >= 6
):
# install cypress
click.secho("Installing Cypress...", fg="yellow")
frappe.commands.popen("yarn add cypress@^6 cypress-file-upload@^5 --no-lockfile")


Loading…
取消
儲存