When I open Page with LWC Component under Cypress.io test, then Salesforce returns error:
A Component Error has occurred!
undefined is not a valid component, or does not extends LightningElement from "lwc". You probably forgot to add the extend clause on the class declaration.
Use Lightning Web Security for Lightning web components is enabled
Cypress code is simple:
describe('playground', () => {
it('playground', function () {
cy.request({
body: {
display: 'page',
hasRememberUn: true,
height: '1080',
lt: 'standard',
pw: Cypress.env('password'),
un: Cypress.env('email'),
useSecure: true,
username: Cypress.env('email'),
width: '2560',
},
form: true,
method: 'POST',
url: 'https://login.salesforce.com',
})
cy.visit('/lightning/n/TestCypressPage')
})
})
What I do wrong?