Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: misc-fixes #474

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,8 @@ docs/packages/javascript-sdk
.nx/*
!.nx/workflows
**/vite.config.ts.timestamp-*


# Browserstack
*.obs_test_details*
*.log
3 changes: 2 additions & 1 deletion e2e/autoscript-apps/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"tags": ["scope:app"],
"targets": {
"build": {
"dependsOn": ["javascript-sdk:build", "ping-protect:build", "^build"],
"dependsOn": ["^build"],
"inputs": ["default", "^default"],
"outputs": ["{projectRoot}/dist"],
"options": {
Expand All @@ -19,6 +19,7 @@
}
},
"serve": {
"dependsOn": ["build"],
"defaultConfiguration": "development",
"configurations": {
"development": {},
Expand Down
6 changes: 5 additions & 1 deletion e2e/autoscript-suites/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ LICENSE
.bin
dist
.eslintignore
*.html
*.html
browserstack.yml
log/*
obs*
*.log
120 changes: 120 additions & 0 deletions e2e/autoscript-suites/browserstack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# =============================
# Set BrowserStack Credentials
# =============================
# Add your BrowserStack userName and accessKey here or set BROWSERSTACK_USERNAME and
# BROWSERSTACK_ACCESS_KEY as env variables
userName: ryanbasmajian_4WeXZt
accessKey: qvpytu4dRWGkFX2y5xEP

# ======================
# BrowserStack Reporting
# ======================
# The following capabilities are used to set up reporting on BrowserStack:
# Set 'projectName' to the name of your project. Example, Marketing Website
projectName: BrowserStack Samples
# Set `buildName` as the name of the job / testsuite being run
buildName: browserstack build
# `buildIdentifier` is a unique id to differentiate every execution that gets appended to
# buildName. Choose your buildIdentifier format from the available expressions:
# ${BUILD_NUMBER} (Default): Generates an incremental counter with every execution
# ${DATE_TIME}: Generates a Timestamp with every execution. Eg. 05-Nov-19:30
# Read more about buildIdentifiers here -> https://www.browserstack.com/docs/automate/selenium/organize-tests
buildIdentifier: '#${BUILD_NUMBER}' # Supports strings along with either/both ${expression}

# =======================================
# Platforms (Browsers / Devices to test)
# =======================================
# Platforms object contains all the browser / device combinations you want to test on.
# Entire list available here -> (https://www.browserstack.com/list-of-browsers-and-platforms/automate)
platforms:
# - os: OS X
# osVersion: Big Sur
# browserName: Chrome
# browserVersion: latest - 2
# - os: OS X
# osVersion: Big Sur
# browserName: playwright-firefox
# browserVersion: latest - 2
# - os: OS X
# osVersion: Big Sur
# browserName: playwright-webkit
# browserVersion: latest - 2
# - os: Windows
# osVersion: 10
# browserName: Edge
# browserVersion: latest - 2
# - os: Windows
# osVersion: 11
# browserName: Chrome
# browserVersion: latest - 2
# - os: Windows
# osVersion: 11
# browserName: playwright-firefox
# browserVersion: latest - 2

- deviceName: iPhone 15 Pro Max
osVersion: 17
browserName: safari
deviceOrientation: portrait
- deviceName: iPhone 15 Pro Max
osVersion: 17
browserName: chromium
deviceOrientation: portrait
- deviceName: iPhone 13 Pro
osVersion: 15
browserName: safari
deviceOrientation: portrait
- deviceName: iPhone 15 Pro
osVersion: 17
browserName: chromium
deviceOrientation: portrait
- deviceName: iPhone 14
osVersion: 18
browserName: safari
deviceOrientation: portrait
- deviceName: iPhone 14
osVersion: 16
browserName: chromium
deviceOrientation: portrait

# - deviceName: Samsung Galaxy S22 Ultra
# browserName: chrome # Try 'samsung' for Samsung browser
# osVersion: 12.0

# =======================
# Parallels per Platform
# =======================
# The number of parallel threads to be used for each platform set.
# BrowserStack's SDK runner will select the best strategy based on the configured value
#
# Example 1 - If you have configured 3 platforms and set `parallelsPerPlatform` as 2, a total of 6 (2 * 3) parallel threads will be used on BrowserStack
#
# Example 2 - If you have configured 1 platform and set `parallelsPerPlatform` as 5, a total of 5 (1 * 5) parallel threads will be used on BrowserStack
parallelsPerPlatform: 1

# ==========================================
# BrowserStack Local
# (For localhost, staging/private websites)
# ==========================================
# Set browserStackLocal to true if your website under test is not accessible publicly over the internet
# Learn more about how BrowserStack Local works here -> https://www.browserstack.com/docs/automate/selenium/local-testing-introduction
browserstackLocal: true # <boolean> (Default false)
# browserStackLocalOptions:
# Options to be passed to BrowserStack local in-case of advanced configurations
# localIdentifier: # <string> (Default: null) Needed if you need to run multiple instances of local.
# forceLocal: true # <boolean> (Default: false) Set to true if you need to resolve all your traffic via BrowserStack Local tunnel.
# Entire list of arguments available here -> https://www.browserstack.com/docs/automate/selenium/manage-incoming-connections

# ===================
# Debugging features
# ===================
debug: false # <boolean> # Set to true if you need screenshots for every selenium command ran
networkLogs: true # <boolean> Set to true to enable HAR logs capturing
consoleLogs: errors # <string> Remote browser's console debug levels to be printed (Default: errors)
logLevel: debug
# Available options are `disable`, `errors`, `warnings`, `info`, `verbose` (Default: errors)
# CUSTOM_TAG_<INT>: # <string> (Default: parent folder name of the test file) Custom tag for your test suite

# Test Observability is an intelligent test reporting & debugging product. It collects data using the SDK. Read more about what data is collected at https://www.browserstack.com/docs/test-observability/references/terms-and-conditions
# Visit observability.browserstack.com to see your test reports and insights. To disable test observability, specify `testObservability: false` in the key below.
testObservability: true
21 changes: 18 additions & 3 deletions e2e/autoscript-suites/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PlaywrightTestConfig } from '@playwright/test';
import { devices, PlaywrightTestConfig } from '@playwright/test';
import { nxE2EPreset } from '@nx/playwright/preset';
import { workspaceRoot } from '@nx/devkit';

Expand Down Expand Up @@ -36,14 +36,29 @@ const config: PlaywrightTestConfig = {
cwd: workspaceRoot,
},
{
command:
'pnpm nx build javascript-sdk && pnpm nx build ping-protect && pnpm nx serve autoscript-apps',
command: 'pnpm nx serve autoscript-apps',
url: 'http://localhost:8443',
ignoreHTTPSErrors: true,
reuseExistingServer: !process.env.CI,
cwd: workspaceRoot,
},
],
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},

{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},

{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},
],
};

export default config;
1 change: 1 addition & 0 deletions e2e/mock-api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
}
},
"serve": {
"dependsOn": ["build"],
"executor": "@nx/js:node",
"outputs": ["{projectRoot}/dist"],
"options": {
Expand Down
2 changes: 1 addition & 1 deletion e2e/mock-api/src/app/routes.auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ export default function (app) {
const domain = req.url.includes('localhost') ? 'localhost' : 'example.com';

res.clearCookie('redirected');
res.cookie('iPlanetDirectoryPro', 'abcd1234', { domain, sameSite: 'none', secure: true });
res.cookie('iPlanetDirectoryPro', 'abcd1234');
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's just remove the secure: true from the props. The rest can stay.


const url = new URL(`${req.protocol}://${req.headers.host}${authPaths.authorize[1]}`);
url.searchParams.set('client_id', req.query.client_id);
Expand Down
2 changes: 1 addition & 1 deletion e2e/token-vault-proxy/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"tags": ["scope:app"],
"targets": {
"build": {
"dependsOn": ["javascript-sdk:build", "token-vault:build", "^build"],
"dependsOn": ["^build"],
"inputs": ["default", "^default"],
"outputs": ["{projectRoot}/dist"],
"defaultConfiguration": "production",
Expand Down
7 changes: 1 addition & 6 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,7 @@
},
"e2e-ci--**/*": {
"inputs": ["noMarkdown", "^noMarkdown"],
"dependsOn": [
"javascript-sdk:build",
"ping-protect:build",
"token-vault:build"
],
"dependsOn": ["^build"],
"cache": true
}
},
Expand Down Expand Up @@ -122,7 +118,6 @@
],
"defaultProject": "javascript-sdk",
"useDaemonProcess": true,

"useInferencePlugins": true,
"defaultBase": "develop"
}
2 changes: 1 addition & 1 deletion packages/ping-protect/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"command": "npx typedoc --options ./packages/ping-protect/typedoc.json"
},
"build": {
"dependsOn": ["javascript-sdk:build"],
"dependsOn": ["^build"],
"inputs": [
"default",
"^default",
Expand Down
2 changes: 1 addition & 1 deletion packages/token-vault/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"tags": ["scope:package"],
"targets": {
"build": {
"dependsOn": ["javascript-sdk:build"],
"dependsOn": ["^build"],
"inputs": [
"default",
"^default",
Expand Down
Loading