Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Adds i18n config test to be used in widget PDV #893

Merged
merged 2 commits into from
Sep 3, 2020

Conversation

vijetmahabaleshwar-okta
Copy link
Contributor

@vijetmahabaleshwar-okta vijetmahabaleshwar-okta commented Sep 3, 2020

  • We use oidc-middleware custom sign-in page test as PDV for widget global CDN
  • This PR extends the test to include i18n options to catch issues like this
  • Since we already run this test on bacon as PDV, adding i18n test to this repo will get us more coverage without any setup effort (as opposed to adding it in widget repo, in which case we have to setup new tests in bacon)

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Adding Tests
  • Build related changes
  • CI related changes
  • Documentation changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Reviewers

Copy link

@haishengwu-okta haishengwu-okta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! a couple of nits.

Question:
what's usage of harness/start-custom-login-server.js?
I assume specs/custom-login-page.js is for running test.
(The initial code looks identical and wonder if could be consolidated.)

@@ -12,16 +12,25 @@

const constants = require('../util/constants');
const util = require('../util/util');
let options = {};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: looks like options can be const

@@ -12,16 +12,25 @@

const constants = require('../util/constants');
const util = require('../util/util');
let options = {};
let cdnUrl = 'https://global.oktacdn.com/okta-signin-widget/4.4.1';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: would be simplified a little bit as

let widgetVersion = '4.4.1';

if (env.NPM_TARBAR_URL) {
   widgetVersion = version;
}

const cdnUrl = `https://global.oktacdn.com/okta-signin-widget/${widgetVersion}`;

@vijetmahabaleshwar-okta
Copy link
Contributor Author

Thanks! a couple of nits.

Question:
what's usage of harness/start-custom-login-server.js?
I assume specs/custom-login-page.js is for running test.
(The initial code looks identical and wonder if could be consolidated.)

This is if a user wants to start a custom login server without running tests.
I will check if we can consolidate this code, or if we even need this NPM_TARBALL_URL logic here at all.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants