@bigbinary/neeto-playwright-commons 3.0.6 → 3.0.7
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.
- package/index.cjs.js +5 -6
- package/index.cjs.js.map +1 -1
- package/index.d.ts +39 -6
- package/index.js +5 -7
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -238,6 +238,7 @@ const APP_RESOURCES = [
|
|
|
238
238
|
"**/sticky_ribbons",
|
|
239
239
|
"**/neeto_widget_tokens",
|
|
240
240
|
];
|
|
241
|
+
const ALL_RESOURCES = Array.from(new Set([...THIRD_PARTY_RESOURCES, ...APP_RESOURCES]));
|
|
241
242
|
|
|
242
243
|
class ApiKeysApi {
|
|
243
244
|
neetoPlaywrightUtilities;
|
|
@@ -6024,13 +6025,12 @@ class CustomCommands {
|
|
|
6024
6025
|
blockInternalResources = (page = this.page) => Promise.all(APP_RESOURCES.map(pattern => page.context().route(pattern, route => route.abort())));
|
|
6025
6026
|
blockNonEssentialResourceTypes = (page = this.page) => page
|
|
6026
6027
|
.context()
|
|
6027
|
-
.route("**/*", route => ["image", "stylesheet", "font"
|
|
6028
|
+
.route("**/*", route => ["image", "stylesheet", "font"].includes(route.request().resourceType())
|
|
6028
6029
|
? route.abort()
|
|
6029
|
-
: route.
|
|
6030
|
+
: route.fallback());
|
|
6030
6031
|
blockAllResources = (page = this.page) => Promise.all([
|
|
6031
|
-
this.blockExternalResources(page),
|
|
6032
|
-
this.blockInternalResources(page),
|
|
6033
6032
|
this.blockNonEssentialResourceTypes(page),
|
|
6033
|
+
...ALL_RESOURCES.map(pattern => page.context().route(pattern, route => route.abort())),
|
|
6034
6034
|
]);
|
|
6035
6035
|
waitForFloatingMenu = () => test.expect(this.page.getByTestId(COMMON_SELECTORS.floatingActionMenuButton)).toBeVisible({ timeout: 25_000 });
|
|
6036
6036
|
interceptMultipleResponses = ({ responseUrl = "", responseStatus = 200, times = 1, baseUrl, customPageContext = this.page, timeout = 35_000, } = {}) => Promise.all([...new Array(times)].map(() => customPageContext.waitForResponse((response) => {
|
|
@@ -8815,7 +8815,6 @@ class OrganizationPage {
|
|
|
8815
8815
|
await fillCredentialsAndSubmit({ page: this.page, email });
|
|
8816
8816
|
return;
|
|
8817
8817
|
}
|
|
8818
|
-
await this.neetoPlaywrightUtilities.blockInternalResources();
|
|
8819
8818
|
await this.fillEmailAndSubmit(email, loginTimeout);
|
|
8820
8819
|
await this.fillOTP();
|
|
8821
8820
|
await this.dismissAuthenticatorSetupPromptIfPresent();
|
|
@@ -8881,7 +8880,6 @@ class OrganizationPage {
|
|
|
8881
8880
|
}
|
|
8882
8881
|
else {
|
|
8883
8882
|
let otp = "123456";
|
|
8884
|
-
await this.neetoPlaywrightUtilities.blockInternalResources();
|
|
8885
8883
|
await this.page.goto(`${ROUTES.neetoAuthSignup}?redirect_uri=${credentials.domain}`, { timeout: 20_000 });
|
|
8886
8884
|
await this.submitEmail(credentials.email);
|
|
8887
8885
|
if (fetchOtpFromEmail !== undefined) {
|
|
@@ -126204,6 +126202,7 @@ const definePlaywrightConfig = (overrides) => {
|
|
|
126204
126202
|
|
|
126205
126203
|
exports.ACTIONS = ACTIONS;
|
|
126206
126204
|
exports.ADMIN_PANEL_SELECTORS = ADMIN_PANEL_SELECTORS;
|
|
126205
|
+
exports.ALL_RESOURCES = ALL_RESOURCES;
|
|
126207
126206
|
exports.ANALYTICS_RESOURCES = ANALYTICS_RESOURCES;
|
|
126208
126207
|
exports.API_KEYS_SELECTORS = API_KEYS_SELECTORS;
|
|
126209
126208
|
exports.API_ROUTES = API_ROUTES;
|