Compare commits
18 Commits
f2ace3c7df
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| a90d03c4d0 | |||
| a6862543d2 | |||
| 0ec7e1e93a | |||
| 60cc20904e | |||
| 5e04bde2f1 | |||
| ea6e5361be | |||
| e6cae41b78 | |||
| 3396020d5f | |||
| a2b887967f | |||
| 46cac98fb4 | |||
| bc05013472 | |||
| be9bd465af | |||
| de9d1b6c27 | |||
| c572d61a00 | |||
| 4cf278464e | |||
| 946ad9f155 | |||
| 89e4981193 | |||
| bfe7987d05 |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/e2e/.abort-run
|
||||||
13
e2e/.gitignore
vendored
Normal file
13
e2e/.gitignore
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Dependencies
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# Cypress
|
||||||
|
cypress/
|
||||||
|
|
||||||
|
# IDE
|
||||||
|
.vscode/settings.json
|
||||||
|
|
||||||
|
# OS
|
||||||
|
Thumbs.db
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
16
e2e/.vscode/tasks.json
vendored
Normal file
16
e2e/.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"type": "npm",
|
||||||
|
"script": "open",
|
||||||
|
"problemMatcher": [],
|
||||||
|
"label": "npm: open",
|
||||||
|
"detail": "./node_modules/.bin/cypress open",
|
||||||
|
"group": {
|
||||||
|
"kind": "build",
|
||||||
|
"isDefault": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
const { defineConfig } = require('cypress')
|
|
||||||
|
|
||||||
module.exports = defineConfig({
|
|
||||||
defaultCommandTimeout: 5000,
|
|
||||||
xxxretries: 3,
|
|
||||||
xbaseUrl: 'http://localhost:7575',
|
|
||||||
xxxbaseUrl: 'http://localhost:8080',
|
|
||||||
video: false,
|
|
||||||
env: {
|
|
||||||
xapiBaseUrl: 'http://localhost:7575/api/v8.0/',
|
|
||||||
xxapiBaseUrl: 'https://test.onayanova.com/api/v8.0/',
|
|
||||||
apiBaseUrl: 'https://3312.onayanova.com/api/v8.0/',
|
|
||||||
admin: {
|
|
||||||
login: 'superuser',
|
|
||||||
password: 'l3tm3in',
|
|
||||||
},
|
|
||||||
accounting: {
|
|
||||||
login: 'Accounting',
|
|
||||||
password: 'Accounting',
|
|
||||||
},
|
|
||||||
service: {
|
|
||||||
login: 'Service',
|
|
||||||
password: 'Service',
|
|
||||||
},
|
|
||||||
customer: {
|
|
||||||
login: 'Customer',
|
|
||||||
password: 'Customer',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
e2e: {
|
|
||||||
// We've imported your old cypress plugins here.
|
|
||||||
// You may want to clean this up later by importing these.
|
|
||||||
setupNodeEvents(on, config) {
|
|
||||||
return require('./cypress/plugins/index.js')(on, config)
|
|
||||||
},
|
|
||||||
experimentalRunAllSpecs: true,
|
|
||||||
specPattern: 'tests/**/*.cy.{js,jsx,ts,tsx}',
|
|
||||||
supportFile: 'support/e2e.js',
|
|
||||||
xxbaseUrl: 'https://test.onayanova.com',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
20
e2e/cypress.json
Normal file
20
e2e/cypress.json
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"defaultCommandTimeout": 5000,
|
||||||
|
"video": false,
|
||||||
|
"baseUrl": "http://localhost:8080",
|
||||||
|
"integrationFolder": "tests/regression",
|
||||||
|
"testFiles": "**/*.cy.{js,jsx,ts,tsx}",
|
||||||
|
"supportFile": "support/e2e.js",
|
||||||
|
"pluginsFile": "plugins/index.js",
|
||||||
|
"env": {
|
||||||
|
"expectedServerVersion": "8.2.4",
|
||||||
|
"apiBaseUrl": "http://localhost:7575/api/v8.0/",
|
||||||
|
"REMOTE_BASE_URL": "https://devtest.onayanova.com/",
|
||||||
|
"REMOTE_API_URL": "https://devtest.onayanova.com/api/v8.0/",
|
||||||
|
"admin": { "login": "superuser", "password": "l3tm3in" },
|
||||||
|
"accounting": { "login": "Accounting", "password": "Accounting" },
|
||||||
|
"service": { "login": "Service", "password": "Service" },
|
||||||
|
"customer": { "login": "Customer", "password": "Customer" },
|
||||||
|
"bizadmin": { "login": "BizAdmin", "password": "BizAdmin" }
|
||||||
|
}
|
||||||
|
}
|
||||||
4
e2e/local-run.bat
Normal file
4
e2e/local-run.bat
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
./node_modules/.bin/cypress run --browser chrome --config baseUrl=http://localhost:8080 --env apiBaseUrl=http://localhost:7575/api/v8.0/
|
||||||
|
rem ./node_modules/.bin/cypress run --browser electron --config baseUrl=http://localhost:8080 --env apiBaseUrl=http://localhost:7575/api/v8.0/
|
||||||
|
rem ./node_modules/.bin/cypress run --browser firefox --spec .\tests\regression\*.js --no-exit
|
||||||
|
|
||||||
@@ -1,15 +1,14 @@
|
|||||||
|
test change for git test
|
||||||
|
I think the best course from here is to pick through the UI and find if there is anything further worth testing due to it's uniqueness and fragility when refactoring.
|
||||||
|
honestly though this may be enough to move to the next stage
|
||||||
|
|
||||||
todo: test all current smoke, upload and test on devops
|
- Test that confirms the version of the server on the login page is as expected this is so that can be used to test a hosted droplet test server and will ensure it has been updated and correct new build is being tested
|
||||||
|
- Need a way to simplify testing local dev vs online, so can have two separate batch files and just run whichever one required so when release can test locally first then during deployment of installs test one final time on devtest
|
||||||
todo: missing smoke tests:
|
- also include the version to test against in the command line as well. Put it in the pre-data generation and erasure block so it just aborts right away without modifying anything. Maybe just looks at the login page itself
|
||||||
path: "/viewreport",
|
|
||||||
|
|
||||||
|
|
||||||
npm install --save-dev cypress@9.2.1
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
=-=-=-=-=-=-=-=-=-=-=-=-
|
||||||
|
From the olden times years ago:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -17,12 +16,8 @@ npm install --save-dev cypress@9.2.1
|
|||||||
|
|
||||||
todo: meter reading table click on item to confirm item page no other way to easily get id of unit metered unless create it or something
|
todo: meter reading table click on item to confirm item page no other way to easily get id of unit metered unless create it or something
|
||||||
|
|
||||||
|
|
||||||
TODO: high priority grid sort and filter test that excercises *all* options and filter types
|
TODO: high priority grid sort and filter test that excercises *all* options and filter types
|
||||||
this one will be hugely important as part of regression test as it was a constant source of issues in v7
|
this one will be hugely important as part of regression test as it was a constant source of issues in v7
|
||||||
todo: drawing signature test might work with this code:
|
|
||||||
|
|
||||||
cy.get('.main-canvas').trigger('mousedown', 500, 100, { force: true }).trigger('mousemove', 500, 200, { force: true }).trigger('mouseup', { force: true });
|
|
||||||
|
|
||||||
Service user features work
|
Service user features work
|
||||||
sb self contained and use standard test data because will also want to run without accounting prior
|
sb self contained and use standard test data because will also want to run without accounting prior
|
||||||
@@ -30,9 +25,7 @@ Inventory User features work
|
|||||||
OPS featurs work
|
OPS featurs work
|
||||||
Data filters work
|
Data filters work
|
||||||
form customize works
|
form customize works
|
||||||
Report printing works
|
|
||||||
going to be interesting to validate a pdf document, download I guess or look on screen for something??
|
|
||||||
also it's a popup so...?
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
1476
e2e/package-lock.json
generated
Normal file
1476
e2e/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@
|
|||||||
"test": "tests"
|
"test": "tests"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cypress": "^13.8.1"
|
"cypress": "^9.7.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"open": "./node_modules/.bin/cypress open",
|
"open": "./node_modules/.bin/cypress open",
|
||||||
|
|||||||
45
e2e/plugins/index.js
Normal file
45
e2e/plugins/index.js
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
const fs = require('fs')
|
||||||
|
const path = require('path')
|
||||||
|
|
||||||
|
const ABORT_FLAG_PATH = path.join(__dirname, '..', '.abort-run')
|
||||||
|
|
||||||
|
module.exports = (on, config) => {
|
||||||
|
on('before:browser:launch', (browser, launchOptions) => {
|
||||||
|
if (browser.name === 'chrome') {
|
||||||
|
launchOptions.args.push('--disable-gpu')
|
||||||
|
launchOptions.args.push('--no-sandbox')
|
||||||
|
launchOptions.args.push('--disable-dev-shm-usage')
|
||||||
|
}
|
||||||
|
return launchOptions
|
||||||
|
})
|
||||||
|
|
||||||
|
// If a TARGET_ENV env var was passed, override baseUrl and apiBaseUrl
|
||||||
|
if (config.env.TARGET_ENV === 'remote') {
|
||||||
|
config.baseUrl = config.env.REMOTE_BASE_URL
|
||||||
|
config.env.apiBaseUrl = config.env.REMOTE_API_URL
|
||||||
|
}
|
||||||
|
|
||||||
|
// Task to set abort flag
|
||||||
|
on('task', {
|
||||||
|
setAbortFlag() {
|
||||||
|
fs.writeFileSync(ABORT_FLAG_PATH, 'ABORTED')
|
||||||
|
return null
|
||||||
|
},
|
||||||
|
checkAbortFlag() {
|
||||||
|
return fs.existsSync(ABORT_FLAG_PATH)
|
||||||
|
},
|
||||||
|
clearAbortFlag() {
|
||||||
|
if (fs.existsSync(ABORT_FLAG_PATH)) {
|
||||||
|
fs.unlinkSync(ABORT_FLAG_PATH)
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// Clean up abort flag at start of run
|
||||||
|
if (fs.existsSync(ABORT_FLAG_PATH)) {
|
||||||
|
fs.unlinkSync(ABORT_FLAG_PATH)
|
||||||
|
}
|
||||||
|
|
||||||
|
return config
|
||||||
|
}
|
||||||
5
e2e/remote-run.bat
Normal file
5
e2e/remote-run.bat
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
rem ./node_modules/.bin/cypress run --browser electron --config baseUrl=https://devtest.onayanova.com/ --env TARGET_ENV=remote
|
||||||
|
rem ./node_modules/.bin/cypress run --browser "C:\Program Files\Google\Chrome\Application\chrome.exe" --config baseUrl=https://devtest.onayanova.com/ --env TARGET_ENV=remote
|
||||||
|
./node_modules/.bin/cypress run --browser chrome --config baseUrl=https://devtest.onayanova.com/ --env TARGET_ENV=remote
|
||||||
|
rem ./node_modules/.bin/cypress run --browser firefox --spec .\tests\regression\*.js --no-exit
|
||||||
|
rem ./node_modules/.bin/cypress run --browser chrome --no-exit
|
||||||
@@ -1,24 +1,15 @@
|
|||||||
// ***********************************************************
|
|
||||||
// This example support/index.js is processed and
|
|
||||||
// loaded automatically before your test files.
|
|
||||||
//
|
|
||||||
// This is a great place to put global configuration and
|
|
||||||
// behavior that modifies Cypress.
|
|
||||||
//
|
|
||||||
// You can change the location of this file or turn off
|
|
||||||
// automatically serving support files with the
|
|
||||||
// 'supportFile' configuration option.
|
|
||||||
//
|
|
||||||
// You can read more here:
|
|
||||||
// https://on.cypress.io/configuration
|
|
||||||
// ***********************************************************
|
|
||||||
|
|
||||||
// Import commands.js using ES2015 syntax:
|
// Import commands.js using ES2015 syntax:
|
||||||
import "./commands";
|
import "./commands";
|
||||||
|
|
||||||
// Alternatively you can use CommonJS syntax:
|
|
||||||
// require('./commands')
|
|
||||||
|
|
||||||
//unique test run ID for all tests
|
//unique test run ID for all tests
|
||||||
Cypress.config("cyid", `cy${new Date().getTime()}`);
|
Cypress.config("cyid", `cy${new Date().getTime()}`);
|
||||||
|
|
||||||
|
// Global guard: halt all tests if abort flag exists
|
||||||
|
beforeEach(function () {
|
||||||
|
cy.task("checkAbortFlag").then(shouldAbort => {
|
||||||
|
if (shouldAbort) {
|
||||||
|
Cypress.runner.stop();
|
||||||
|
this.skip();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// Basic smoke test, visit every form to ensure they load
|
// Basic smoke test, visit every form to ensure they load
|
||||||
|
|
||||||
describe("SMOKE SETUP", () => {
|
describe("SMOKE SETUP", () => {
|
||||||
it("Generates test data without issue", () => {
|
before(() => {
|
||||||
cy.request({
|
cy.request({
|
||||||
url: `${Cypress.env("apiBaseUrl")}auth`,
|
url: `${Cypress.env("apiBaseUrl")}auth`,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
@@ -12,6 +11,58 @@ describe("SMOKE SETUP", () => {
|
|||||||
})
|
})
|
||||||
.its("body")
|
.its("body")
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
cy.request({
|
||||||
|
method: "GET",
|
||||||
|
url: `${Cypress.env("apiBaseUrl")}server-info`,
|
||||||
|
auth: { bearer: res.data.token }
|
||||||
|
}).then((resp) => {
|
||||||
|
const raw = resp.body.data.serverVersion
|
||||||
|
const match = raw.match(/(\d+\.\d+\.\d+)/)
|
||||||
|
|
||||||
|
if (!match) {
|
||||||
|
cy.task('setAbortFlag').then(() => {
|
||||||
|
throw new Error(`Could not parse version from: "${raw}"`)
|
||||||
|
})
|
||||||
|
return // prevent further execution
|
||||||
|
}
|
||||||
|
|
||||||
|
const version = match[1]
|
||||||
|
const expected = Cypress.env("expectedServerVersion")
|
||||||
|
|
||||||
|
if (version !== expected) {
|
||||||
|
cy.task('setAbortFlag').then(() => {
|
||||||
|
throw new Error(`❌ Version mismatch: server is ${version}, expected ${expected}. ABORTING ALL TESTS.`)
|
||||||
|
})
|
||||||
|
return // prevent further execution
|
||||||
|
}
|
||||||
|
|
||||||
|
cy.log(`✓ Server version confirmed: ${version}`)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it("Generates test data without issue", () => {
|
||||||
|
cy.request({
|
||||||
|
url: `${Cypress.env("apiBaseUrl")}auth`,
|
||||||
|
method: "POST",
|
||||||
|
body: {
|
||||||
|
login: Cypress.env("admin").login,
|
||||||
|
password: Cypress.env("admin").password
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.its("body")
|
||||||
|
.then(res => {
|
||||||
|
cy.request({
|
||||||
|
method: "POST",
|
||||||
|
url: `${Cypress.env("apiBaseUrl")}license/permanently-erase-all-data`,
|
||||||
|
auth: {
|
||||||
|
bearer: res.data.token
|
||||||
|
},
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
},
|
||||||
|
body: JSON.stringify("I understand")
|
||||||
|
}).then(() => {
|
||||||
cy.request({
|
cy.request({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: `${Cypress.env("apiBaseUrl")}trial/seed`,
|
url: `${Cypress.env("apiBaseUrl")}trial/seed`,
|
||||||
@@ -25,12 +76,13 @@ describe("SMOKE SETUP", () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.its("body")
|
.its("body")
|
||||||
.then((resjob) => {
|
.then(resjob => {
|
||||||
cy.log(`resjob is: ${JSON.stringify(resjob)}`);
|
cy.log(`resjob is: ${JSON.stringify(resjob)}`);
|
||||||
// expect(resjob.body).to.have.property('jobId');
|
// expect(resjob.body).to.have.property('jobId');
|
||||||
confirmJobDone(resjob.jobId, res.data.token);
|
confirmJobDone(resjob.jobId, res.data.token);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
//-----------------------------------------------------
|
//-----------------------------------------------------
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -41,7 +93,7 @@ function confirmJobDone(jobId, authToken) {
|
|||||||
auth: {
|
auth: {
|
||||||
bearer: authToken
|
bearer: authToken
|
||||||
}
|
}
|
||||||
}).then((resp) => {
|
}).then(resp => {
|
||||||
//3 means job done
|
//3 means job done
|
||||||
if (resp.body.data == 3) return;
|
if (resp.body.data == 3) return;
|
||||||
// else recurse
|
// else recurse
|
||||||
@@ -49,3 +101,54 @@ function confirmJobDone(jobId, authToken) {
|
|||||||
confirmJobDone(jobId, authToken);
|
confirmJobDone(jobId, authToken);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//===============================================
|
||||||
|
// describe("SMOKE SETUP", () => {
|
||||||
|
// it("Generates test data without issue", () => {
|
||||||
|
// cy.request({
|
||||||
|
// url: `${Cypress.env("apiBaseUrl")}auth`,
|
||||||
|
// method: "POST",
|
||||||
|
// body: {
|
||||||
|
// login: Cypress.env("admin").login,
|
||||||
|
// password: Cypress.env("admin").password
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// .its("body")
|
||||||
|
// .then((res) => {
|
||||||
|
// cy.request({
|
||||||
|
// method: "POST",
|
||||||
|
// url: `${Cypress.env("apiBaseUrl")}trial/seed`,
|
||||||
|
// auth: {
|
||||||
|
// bearer: res.data.token
|
||||||
|
// }, ///small/-7/true
|
||||||
|
// body: {
|
||||||
|
// seedLevel: "small",
|
||||||
|
// timeZoneOffset: -7,
|
||||||
|
// e2e: true
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// .its("body")
|
||||||
|
// .then((resjob) => {
|
||||||
|
// cy.log(`resjob is: ${JSON.stringify(resjob)}`);
|
||||||
|
// // expect(resjob.body).to.have.property('jobId');
|
||||||
|
// confirmJobDone(resjob.jobId, res.data.token);
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
// //-----------------------------------------------------
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
// function confirmJobDone(jobId, authToken) {
|
||||||
|
// cy.request({
|
||||||
|
// method: "GET",
|
||||||
|
// url: `${Cypress.env("apiBaseUrl")}job-operations/status/${jobId}`,
|
||||||
|
// auth: {
|
||||||
|
// bearer: authToken
|
||||||
|
// }
|
||||||
|
// }).then((resp) => {
|
||||||
|
// //3 means job done
|
||||||
|
// if (resp.body.data == 3) return;
|
||||||
|
// // else recurse
|
||||||
|
// cy.wait(1000);
|
||||||
|
// confirmJobDone(jobId, authToken);
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Basic nav and menu test just to confirm each section menu works
|
// Basic nav and menu test just to confirm each section menu works
|
||||||
describe("SMOKE NAV", () => {
|
describe("SMOKE NAV", () => {
|
||||||
it("Nav and menu functions correctly", () => {
|
it("Nav and menu functions correctly", () => {
|
||||||
cy.ayLogin("admin");
|
cy.ayLogin("bizadmin");
|
||||||
|
|
||||||
cy.get("[data-cy=navicon]").click();
|
cy.get("[data-cy=navicon]").click();
|
||||||
cy.get("[data-cy=home]").click();
|
cy.get("[data-cy=home]").click();
|
||||||
|
|||||||
29
e2e/tests/regression/2-report/001-run-report.cy.js
Normal file
29
e2e/tests/regression/2-report/001-run-report.cy.js
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
describe("Report generation", () => {
|
||||||
|
it("Customer report opens without error", () => {
|
||||||
|
cy.ayLogin("bizadmin");
|
||||||
|
|
||||||
|
cy.visit("/cust-customers/1");
|
||||||
|
cy.url().should("include", "/cust-customers/1");
|
||||||
|
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||||
|
cy.get("[data-cy=name]");
|
||||||
|
|
||||||
|
// Stub window.open AFTER the page has loaded
|
||||||
|
cy.window().then(win => {
|
||||||
|
cy.stub(win, "open").as("windowOpen");
|
||||||
|
});
|
||||||
|
|
||||||
|
cy.get("[data-cy=contextmenu]").click();
|
||||||
|
cy.get("[data-cy='customer-edit:report']").click();
|
||||||
|
cy.get(".v-list > :nth-child(1) > .v-list-item__title").click();
|
||||||
|
|
||||||
|
// The render job is async — give it time to complete and call window.open
|
||||||
|
// Adjust timeout if your reports take longer to render
|
||||||
|
cy.get("@windowOpen", { timeout: 30000 }).should("have.been.calledOnce");
|
||||||
|
|
||||||
|
// Verify the URL passed to window.open looks like a PDF download
|
||||||
|
cy.get("@windowOpen").should(
|
||||||
|
"have.been.calledWithMatch",
|
||||||
|
/\/api\/v8\.0\/report\/download\/.+\.pdf/
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -62,7 +62,13 @@ describe("Workorder creation", () => {
|
|||||||
cy.ayChooseGZPickList("projectId", "e2e");
|
cy.ayChooseGZPickList("projectId", "e2e");
|
||||||
cy.get("[data-cy='serviceDate:date']").type(dayjs().format("YYYY-MM-DD"));
|
cy.get("[data-cy='serviceDate:date']").type(dayjs().format("YYYY-MM-DD"));
|
||||||
cy.get("[data-cy='serviceDate:time']").type(dayjs().format("HH:mm"));
|
cy.get("[data-cy='serviceDate:time']").type(dayjs().format("HH:mm"));
|
||||||
cy.get("[data-cy=customerContactName]").type(`Jayne Smith`);
|
//This is a dialog component and no matter what I do I can't get any data-cy tag to be exposed in the actual tested UI
|
||||||
|
//even though every bit of it has a data-cy tag at every level in the source code. It doesn't seem to exist as it's coded
|
||||||
|
//clicking on it didn't help. It used to be a simple text input but now it's broken and I have no idea how to test it
|
||||||
|
//but it's not critical so bypassing it for now. First was teh simple type then tried the click and type, neither works
|
||||||
|
//inspecting it shows no data-cy tags anywhere despite them being coded
|
||||||
|
//cy.get("[data-cy=customerContactName]").click().type(`Jayne Smith`);
|
||||||
|
//cy.get("[data-cy=customerContactName]").type(`Jayne Smith`);//26fail Timed out retrying after 5000ms: Expected to find element: [data-cy=customerContactName], but never found it.
|
||||||
cy.get("[data-cy=customerReferenceNumber]").type(
|
cy.get("[data-cy=customerReferenceNumber]").type(
|
||||||
`cref-${Cypress.config("cyid")}`
|
`cref-${Cypress.config("cyid")}`
|
||||||
);
|
);
|
||||||
Reference in New Issue
Block a user