Files
raven-test/e2e/notes.txt
2026-02-15 11:27:52 -08:00

135 lines
6.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Password breach warning error mitigation:
To suppress Chrome's "password exposed in breach" warning during Cypress tests with intentional weak test passwords, **disable Chrome's password leak detection features via browser launch flags**. This is the cleanest, most reliable solution for test environments.
### ✅ Recommended Fix (Cypress Config)
Add this to your Cypress configuration to disable the relevant Chrome features:
#### For Cypress v10+ (`cypress.config.js`):
```javascript
const { defineConfig } = require('cypress');
module.exports = defineConfig({
e2e: {
setupNodeEvents(on, config) {
on('before:browser:launch', (browser, launchOptions) => {
if (browser.name === 'chrome') {
// Disable password breach warnings + related features
launchOptions.args.push(
'--disable-features=PasswordLeakDetection,PasswordManagerLeakDetection,PasswordCheck,InsecureCredentialsWarning'
);
// Optional: Disable password manager entirely if warnings persist
// launchOptions.args.push('--disable-blink-features=PasswordManager');
}
return launchOptions;
});
},
},
});
```
#### For Cypress ≤ v9 (`cypress/plugins/index.js`):
```javascript
module.exports = (on, config) => {
on('before:browser:launch', (browser, launchOptions) => {
if (browser.name === 'chrome') {
launchOptions.args.push(
'--disable-features=PasswordLeakDetection,PasswordManagerLeakDetection,PasswordCheck,InsecureCredentialsWarning'
);
}
return launchOptions;
});
};
```
### 🔑 Why this works:
- `PasswordLeakDetection` / `PasswordManagerLeakDetection`: Blocks breach-checking logic
- `PasswordCheck`: Disables Chrome's "Password Checkup" feature
- `InsecureCredentialsWarning`: Suppresses "insecure password" UI warnings (critical for obvious passwords like "Accounting")
- Flags are **non-intrusive**—they dont alter your apps behavior or test logic
- Works in both headed and headless Chrome modes
- Zero maintenance vs. fragile DOM-interaction workarounds
### ⚠️ Important Notes:
1. **Test passwords remain intentionally weak**—this solution *only* silences Chrome's UI warning.
🔒 *Never use these passwords outside isolated test environments.*
2. If warnings persist:
- Update Chrome flags based on your Chrome version (check `chrome://version` → "Command Line")
- Temporarily add `--disable-blink-features=PasswordManager` (disables entire password manager; use only if tests dont rely on autofill)
3. **Do NOT**:
- Try clicking away the warning in tests (flaky, slows tests, fragile selector)
- Disable Safe Browsing globally (`--safebrowsing-disable-auto-update`)—overly broad security risk
- Modify system Chrome settings (Cypress uses isolated profiles)
### 💡 Pro Tip:
For future-proofing, consider generating **unique strong passwords per test run** (e.g., `Accounting_${Date.now()}`) and resetting them between tests. This avoids breach warnings *and* aligns with security best practices—but the flag solution above is perfect for your current constraint of fixed sample passwords. 😊
=-=-=-=-=-=-=-=-=-=-=-=-
From the olden times years ago:
todo: test all current smoke, upload and test on devops
todo: missing smoke tests:
path: "/viewreport",
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: 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
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
sb self contained and use standard test data because will also want to run without accounting prior
Inventory User features work
OPS featurs work
Data filters work
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...?
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNTAwIDI0OS42IiB3aWR0aD0iNTAwIiBoZWlnaHQ9IjI0OS42Ij48Y2lyY2xlIHI9IjEuNSIgY3g9IjAuMzk5OTkzODk2NDg0Mzc1IiBjeT0iMCIgZmlsbD0icmdiKDAsIDAsIDApIj48L2NpcmNsZT48Y2lyY2xlIHI9IjEuNSIgY3g9IjQ5OC4zOTk5OTM4OTY0ODQ0IiBjeT0iMCIgZmlsbD0icmdiKDAsIDAsIDAp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zdmc+"
=====================================================================================================================================
Smoke test = quick test to ensure the most critical functionality is not broken
this is not so useful for us as the act of development involves many smoke tests on it's own
also we don't release often enough to need this kind of test
Regression test = extremely detailed test to ensure *all* functionality is working properly
this is the most useful test for us and the one to run before any releases
Assuming it takes an hour or two at the most to run that's perfectly fine before a release as a sanity check