mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-05 03:26:54 +00:00
test: saml - metadata load
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import BasePage from '../Base';
|
||||
import { ProjectsPage } from '../ProjectsPage';
|
||||
import { expect } from '@playwright/test';
|
||||
import { expect, request } from '@playwright/test';
|
||||
import { Domain } from './Domain';
|
||||
import { OrgAdminPage } from './index';
|
||||
|
||||
@@ -105,7 +105,17 @@ export class CloudSSO extends BasePage {
|
||||
|
||||
await samlModal.locator('[data-test-id="nc-saml-title"]').fill(p.title);
|
||||
if (p.url) {
|
||||
await samlModal.locator('[data-test-id="nc-saml-metadata-url"]').fill(p.url);
|
||||
// await samlModal.locator('[data-test-id="nc-saml-metadata-url"]').fill(p.url);
|
||||
// if url then extract the xml data and fill it, since local urls are not supported
|
||||
const requestContext = await request.newContext();
|
||||
|
||||
const response = await requestContext.get(p.url);
|
||||
|
||||
const text = await response.text(); // extract as plain text
|
||||
|
||||
p.xml = text;
|
||||
|
||||
await requestContext.dispose();
|
||||
}
|
||||
if (p.xml) {
|
||||
await samlModal.locator('[data-test-id="nc-saml-xml"]').fill(p.xml);
|
||||
|
||||
Reference in New Issue
Block a user