@globisnv/cypress-core 0.0.3 → 0.0.4

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.
@@ -182,17 +182,15 @@ Cypress.Commands.add('GLO_oktaLogin', (company, urlType, skipvNavCheck) => {
182
182
  url = url.replace(target, urlType);
183
183
  }
184
184
  if (cypressWebsocketLoader) {
185
- cy.WS_visitWithSpy(url);
186
- }
187
- else {
188
- cy.visit(url);
189
- }
190
- cy.task('log', 'Redirect to okta url');
191
- if (cypressWebsocketLoader) {
185
+ // Stateless Okta login redirects server side before any Servoy client boots, so there is
186
+ // no websocket to wait for on the first visit. Attach the spy to every document load and
187
+ // only assert the connection after the Okta round trip (see waitForWebSocketAfterOkta).
192
188
  cy.on('window:before:load', (win) => {
193
189
  attachWebSocketSpy(win);
194
190
  });
195
191
  }
192
+ cy.visit(url);
193
+ cy.task('log', 'Redirect to okta url');
196
194
  cy.origin(Cypress.expose('oktaUrl'), () => {
197
195
  cy.get('.o-form-input', { timeout: 60000 })
198
196
  .find('[autocomplete="username"]')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@globisnv/cypress-core",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Core building blocks for Globis Cypress E2E tests",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",