@shopware-ag/acceptance-test-suite 11.0.0 → 11.1.0

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/dist/index.d.mts CHANGED
@@ -1044,12 +1044,14 @@ interface TestDataFixtureTypes {
1044
1044
  TestDataService: TestDataService;
1045
1045
  }
1046
1046
 
1047
+ type FeaturesType = Record<string, boolean>;
1047
1048
  interface HelperFixtureTypes {
1048
1049
  IdProvider: IdProvider;
1049
1050
  SaaSInstanceSetup: () => Promise<void>;
1050
1051
  InstanceMeta: {
1051
1052
  version: string;
1052
1053
  isSaaS: boolean;
1054
+ features: FeaturesType;
1053
1055
  };
1054
1056
  }
1055
1057
 
package/dist/index.d.ts CHANGED
@@ -1044,12 +1044,14 @@ interface TestDataFixtureTypes {
1044
1044
  TestDataService: TestDataService;
1045
1045
  }
1046
1046
 
1047
+ type FeaturesType = Record<string, boolean>;
1047
1048
  interface HelperFixtureTypes {
1048
1049
  IdProvider: IdProvider;
1049
1050
  SaaSInstanceSetup: () => Promise<void>;
1050
1051
  InstanceMeta: {
1051
1052
  version: string;
1052
1053
  isSaaS: boolean;
1054
+ features: FeaturesType;
1053
1055
  };
1054
1056
  }
1055
1057
 
package/dist/index.mjs CHANGED
@@ -3,6 +3,7 @@ export * from '@playwright/test';
3
3
  import { Image } from 'image-js';
4
4
  import crypto from 'crypto';
5
5
  import { stringify } from 'uuid';
6
+ import { satisfies } from 'compare-versions';
6
7
  import fs from 'fs';
7
8
  import { AxeBuilder } from '@axe-core/playwright';
8
9
  import { createHtmlReport } from 'axe-html-reporter';
@@ -2997,9 +2998,19 @@ const test$7 = test$e.extend({
2997
2998
  const response = await context.get("./_info/config");
2998
2999
  expect(response.ok(), "/_info/config request failed").toBeTruthy();
2999
3000
  const config = await response.json();
3001
+ const features = {};
3002
+ if (satisfies(config.version, ">=6.6.0.0")) {
3003
+ const featuresResponse = await context.get("./_action/feature-flag");
3004
+ expect(featuresResponse.ok(), "/_action/feature-flag request failed").toBeTruthy();
3005
+ const data = await featuresResponse.json();
3006
+ for (const k in data) {
3007
+ features[k] = data[k].active;
3008
+ }
3009
+ }
3000
3010
  use({
3001
3011
  version: config.version,
3002
- isSaaS: await isSaaSInstance(context)
3012
+ isSaaS: await isSaaSInstance(context),
3013
+ features
3003
3014
  });
3004
3015
  },
3005
3016
  { scope: "worker" }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopware-ag/acceptance-test-suite",
3
- "version": "11.0.0",
3
+ "version": "11.1.0",
4
4
  "description": "Shopware Acceptance Test Suite",
5
5
  "author": "shopware AG",
6
6
  "license": "MIT",
@@ -40,6 +40,7 @@
40
40
  "@playwright/test": "^1.49.1",
41
41
  "@shopware/api-client": "0.5.0",
42
42
  "axe-html-reporter": "2.2.3",
43
+ "compare-versions": "^6.1.1",
43
44
  "image-js": "0.35.5",
44
45
  "uuid": "9.0.1"
45
46
  },