generator-bitloops 0.3.9 → 0.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -11,6 +11,13 @@ export const isOutOfBounds = (inRect: DOMRect, outRect: DOMRect): boolean => {
|
|
|
11
11
|
return isOut;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
+
export const isOutOfHorizontalBounds = (inRect: DOMRect, outRect: DOMRect): boolean => {
|
|
15
|
+
const isOut =
|
|
16
|
+
inRect.left < outRect.left ||
|
|
17
|
+
inRect.right > outRect.right;
|
|
18
|
+
return isOut;
|
|
19
|
+
};
|
|
20
|
+
|
|
14
21
|
export const hasHorizontalScroll = (document: Document): boolean => {
|
|
15
22
|
const scrollingElement = document.scrollingElement;
|
|
16
23
|
if (!scrollingElement) {
|
|
@@ -1,32 +1,25 @@
|
|
|
1
1
|
import { defineConfig } from 'cypress';
|
|
2
|
-
import * as fs from 'fs';
|
|
3
|
-
import * as path from 'path';
|
|
4
2
|
|
|
5
3
|
export default defineConfig({
|
|
6
4
|
e2e: {
|
|
7
5
|
specPattern: "**/*.cy.{ts,tsx}",
|
|
8
6
|
supportFile: false,
|
|
9
7
|
testIsolation: false,
|
|
10
|
-
setupNodeEvents(on) {
|
|
11
|
-
on('task', {
|
|
12
|
-
saveTestResults(results) {
|
|
13
|
-
const resultsPath = path.join(__dirname, '.', 'cypress', 'results', 'results.json');
|
|
14
|
-
if (!fs.existsSync(resultsPath)) {
|
|
15
|
-
fs.writeFileSync(resultsPath, '[]'); // Create file if it doesn't exist
|
|
16
|
-
}
|
|
17
|
-
const existingResults = JSON.parse(fs.readFileSync(resultsPath, 'utf8'));
|
|
18
|
-
existingResults.push(JSON.parse(results));
|
|
19
|
-
fs.writeFileSync(resultsPath, JSON.stringify(existingResults, null, 2));
|
|
20
|
-
return null; // Indicate the task was successful
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
},
|
|
24
8
|
},
|
|
25
9
|
reporter: "mochawesome",
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
10
|
+
reporterOptions: {
|
|
11
|
+
reportDir: "cypress/results",
|
|
12
|
+
overwrite: true,
|
|
13
|
+
html: true,
|
|
14
|
+
json: true,
|
|
15
|
+
reportTitle: "Component Testing",
|
|
16
|
+
reportPageTitle: "Bitloops Component Testing",
|
|
17
|
+
charts: true,
|
|
18
|
+
reportFilename: "report",
|
|
19
|
+
code: true,
|
|
20
|
+
showPassed: true,
|
|
21
|
+
showFailed: true,
|
|
22
|
+
showSkipped: true,
|
|
23
|
+
saveJson: true,
|
|
24
|
+
},
|
|
32
25
|
});
|