brash-tiger-52405
02/28/2023, 10:35 AMadamant-beard-17074
02/28/2023, 1:07 PMchilly-secretary-34320
02/28/2023, 2:20 PMicy-zoo-67885
02/28/2023, 2:55 PMkind-eve-72052
02/28/2023, 4:30 PM--remote-debugging-port
flag and chrome-remote-interface
library to retrieve and store these logs. Is something like this possible to do for Webkit/Safari or any other way to do it in Cypress?stocky-salesclerk-42224
02/28/2023, 5:16 PMshy-accountant-52090
02/28/2023, 5:26 PMwonderful-carpenter-84941
02/28/2023, 6:24 PMripe-apple-15128
02/28/2023, 8:00 PMℹ 「wdm」: Failed to compile.
✖ 「wdm」: 1031 modules
ERROR in
src/components/Sparkline.tsx
Line 46:11: Parsing error: Unexpected token
44 |
45 | class Sparkline extends React.Component<Props, State> {
> 46 | private static TREAT_NULLS_AS_ZERO = false;
`
rhythmic-lizard-86607
02/28/2023, 8:09 PMaloof-minister-26761
02/28/2023, 9:36 PMsquare-gigabyte-37939
03/01/2023, 4:37 AMlittle-translator-68537
03/01/2023, 2:24 PMchilly-vase-64353
03/01/2023, 5:09 PMstocky-salesclerk-42224
03/01/2023, 7:47 PMripe-apple-15128
03/02/2023, 1:18 AMYour configFile is invalid: /cypress.config.ts
It threw an error when required, check the stack trace below:
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /cypress.config.ts
magnificent-lamp-44201
03/02/2023, 2:35 AMvalue
property from a list of input elements, but I just only get the first value.
I tried something like this, to get all the values:
typescript
cy.get('table tbody tr td:nth-child(2) input')invoke('prop', 'value').each(($el) => actualResult.push($el));
but I'm getting an error since it's not possible to chain the invoke()
and each()
commands together.
Is there a way to get the values for my list of elements?
And other question that comes to me, related to this: How can I get the values for the other existing properties of my list of elements?
Thanks in advance for your answers!broad-ram-1055
03/02/2023, 8:07 AMdescribe()
have tags
- I'm using cypress/grep
plugin to enable to tagging mechanism
- Config is correct and can run cases linked with specific tags
Concern
- This plugin parses though all the spec files at runtime to find the tags and consumes execution time.
Solution
- This plugin has a filtering mechanism using grepFilterSpecs
parameter so it'll only run those spec files where the tag will match and not all the spec files
Issue
- I have done all the config required for this and still it runs all the spec file instead of just couple of them where the tag exist.
- Can see message on console as Could not determine test names in file: ${filePath}
Versions
- "@cypress/grep": "^3.1.4",
- "cypress": "^10.11.0",
Adding Code reference in the threadmost-airline-43297
03/02/2023, 6:02 PMnpx cypress run --record --key <some key> --parallel --headless
I expected that Cypress will run the tests in parallel across multiple machines, when I verify in the dashboard if it ran on multiple machines, it just states that it ran on 1 machine, and the speed could be improvement by adding more machines. For this PoC it just has 4 tests.
Apparently I am doing something wrong, but I am not entirely sure what.
- What am I missing?
- How I can distribute the tests over multiple machines to speed up the execution? Because there are multiple runners available in our Gitlab instance.
Thanks in advance!
Gitlab file
variables:
npm_config_cache: "$CI_PROJECT_DIR/.npm"
CYPRESS_CACHE_FOLDER: "$CI_PROJECT_DIR/cache/Cypress"
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .npm
- cache/Cypress
- node_modules
build_cypress:
image: <cypress image in container registry>
<<: *cypress_rules
stage: prepare
script:
- cd legacy/e2e
- npm ci
- npx cypress cache path
- npx cypress cache list
run_cypress_folder_1:
image: <cypress image in container registry>
<<: *cypress_rules
stage: test
parallel: 5
script:
- cd legacy/e2e
- npm install cypress
- npx cypress run --record --key <SOMEKEY> --parallel --headless
artifacts:
when: always
paths:
# the path here is needed to expose the file and be able to send it to Datadog.
- $CI_PROJECT_DIR/legacy/e2e/cypress/results/**/*.xml
https://docs.cypress.io/guides/guides/parallelization
https://docs.cypress.io/guides/continuous-integration/gitlab-cibusy-tailor-13324
03/02/2023, 6:17 PMkind-eve-72052
03/02/2023, 7:00 PM@cypress/code-coverage
library to retrieve current code coverage for these tests. I was able to successfully add @cypress/code-coverage
library, but was getting an error shown in the screenshot. After digging deeper into @cypress/code-coverage
readme noticed this error could be shown if there is NO frontend code coverage, is this the case in my situation or do I need to add some extra libraries? Also tried to set expectBackendCoverageOnly: true
to get rid of the error, but not sure what I am supposed to set as my url in this case is there extra code needed on clients side of the code?busy-tailor-13324
03/02/2023, 8:36 PMechoing-tent-95037
03/02/2023, 11:13 PMcy.intercept
followed with .then(resp)
to gather the response values from the resp
busy-soccer-31234
03/02/2023, 8:46 PMwonderful-carpenter-84941
03/02/2023, 9:02 PMCypress.Commands.add('loginWithSession', () => {
cy.session('loginWithSession', () =>{
cy.loginWithWeb();
},{
cacheAcrossSpecs: true,
});
cy.visit('/');
});
busy-soccer-31234
03/02/2023, 9:34 PMechoing-tent-95037
03/02/2023, 11:12 PMloud-telephone-11500
03/03/2023, 6:37 AMbrash-plumber-51185
03/03/2023, 10:21 AMjs
describe("fetch data and create tests", () => {
const fetchData = async () => {
const res = fetch(myUrl)
const data = res.json()
// map to array
return data
}
fetchData().then(data =>
it(`Test ${data}`, () => {
// expect something
})
)}
})
The issue is that the tests never runs.
I've tried moving the fetching logic inside before
with no luck.
I'm really out of options here.
How do I accomplish this?quick-city-89997
03/03/2023, 2:23 PMbeforeEach
but it's taking so long...
Want to avoid the msal.js. Any other thoughts about this?