[ 
https://issues.apache.org/jira/browse/TINKERPOP-3260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18125285#comment-18125285
 ] 

ASF GitHub Bot commented on TINKERPOP-3260:
-------------------------------------------

kenhuuu commented on code in PR #3674:
URL: https://github.com/apache/tinkerpop/pull/3674#discussion_r4224893790


##########
gremlin-js/gremlin-javascript/test/browser/playwright.config.ts:
##########
@@ -0,0 +1,56 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+import { defineConfig, devices } from '@playwright/test';
+
+const port = 4173;
+
+export default defineConfig({
+  testDir: '.',
+  fullyParallel: true,
+  reporter: 'line',
+  webServer: {
+    command: `node serve.mjs`,
+    cwd: import.meta.dirname,
+    env: { PORT: String(port) },
+    port,
+    reuseExistingServer: !process.env.CI,
+  },
+  use: {
+    baseURL: `http://localhost:${port}`,
+  },
+  projects: [
+    {
+      name: 'chromium',
+      testMatch: 'bundle-load.spec.ts',
+      use: { ...devices['Desktop Chrome'] },
+    },
+    {
+      // The Gremlin Server used by the live round-trip test does not send 
CORS headers (see
+      // live-roundtrip.spec.ts), so this project only exists to relax that 
for the fixture's own
+      // origin. It is not a statement that gremlin-javascript needs this in 
production.
+      name: 'chromium-live',
+      testMatch: 'live-roundtrip.spec.ts',
+      use: {
+        ...devices['Desktop Chrome'],
+        launchOptions: { args: ['--disable-web-security'] },

Review Comment:
   We shouldn't do this as this is actually the best way to test Gremlin 
Server's CORS support.





> Browser testing for gremlin-javascript
> --------------------------------------
>
>                 Key: TINKERPOP-3260
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-3260
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: driver
>    Affects Versions: 4.0.0
>            Reporter: Guian Gumpac
>            Priority: Major
>             Fix For: 4.0.0
>
>
> It would be nice to have some sort of smoke test to verify changes in 
> gremlin-javascript still allows for the driver to work for browsers. Close 
> https://issues.apache.org/jira/browse/TINKERPOP-2143 once this is properly 
> tested.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to