DevExpress / testcafe-action

TestCafe test runner for GitHub Actions
https://testcafe.io
MIT License
37 stars 16 forks source link

Cannot Login to Angular App that uses Angular 13 ERROR TypeError: Cannot read properties of undefined (reading 'digest') #27

Closed jenaewhitmore closed 2 years ago

jenaewhitmore commented 2 years ago

We upgraded our application to use Angular 13 using the below script and it fails to hit the login page

import { Selector } from "testcafe";

fixture`Home Test`
.page`publicurl`;

test('Can I Login', async controller => {

    const button = Selector('button').withText('Login');
    await controller 
    .typeText('#Username', 'user')
    .typeText('#Password', 'password')
    .click(button);

The following error is displayed in the console

//console error = hammerhead.js:15
// ERROR TypeError: Cannot read properties of undefined (reading 'digest') // at JwtWindowCryptoService.calcHash (vendor.js:221136:74) // at JwtWindowCryptoService.generateCodeChallenge (vendor.js:221123:17) // at UrlService.createUrlCodeFlowAuthorize (vendor.js:222609:40) // at UrlService.getAuthorizeUrl (vendor.js:222295:19) // at SafeSubscriber._next (vendor.js:226686:23) // at SafeSubscriber.__tryOrUnsub (vendor.js:64444:16) // at SafeSubscriber.next (vendor.js:64383:22) // at Subscriber._next (vendor.js:64333:26) // at Subscriber.next (vendor.js:64310:18) // at Observable._subscribe (vendor.js:69185:20)

jenaewhitmore commented 2 years ago

should be a bug report