@atlaskit/media-card 74.1.2 → 74.1.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaskit/media-card
2
2
 
3
+ ## 74.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`46059beebbf`](https://bitbucket.org/atlassian/atlassian-frontend/commits/46059beebbf) - - include **tests_external** in build
8
+ - replace usage of @local-cypress package with @cypress
9
+ - bump @cypress from ^6.4.0 to ^7.7.0
10
+ - import cypress types into @atlaskit/in-product-testing tsconfig
11
+
3
12
  ## 74.1.2
4
13
 
5
14
  ### Patch Changes
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "MediaCardPageObject", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _MediaCard.MediaCardPageObject;
10
+ }
11
+ });
12
+
13
+ var _MediaCard = require("./page-objects/MediaCard");
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.MediaCardPageObject = void 0;
9
+
10
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
+
12
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
+
14
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
15
+
16
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
17
+
18
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
19
+
20
+ var _inProductTesting = require("@atlaskit/in-product-testing");
21
+
22
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
23
+
24
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
25
+
26
+ var MediaCardPageObject = /*#__PURE__*/function (_InProductTestPageObj) {
27
+ (0, _inherits2.default)(MediaCardPageObject, _InProductTestPageObj);
28
+
29
+ var _super = _createSuper(MediaCardPageObject);
30
+
31
+ function MediaCardPageObject() {
32
+ (0, _classCallCheck2.default)(this, MediaCardPageObject);
33
+ return _super.apply(this, arguments);
34
+ }
35
+
36
+ (0, _createClass2.default)(MediaCardPageObject, [{
37
+ key: "expectCardReady",
38
+ value: function expectCardReady(numOfCards) {
39
+ var _this = this;
40
+
41
+ return this.cy.get('[data-test-media-name]').should('have.length', numOfCards).each(function (element) {
42
+ _this.cy.wrap(element) // NOTE: `be.visible` is used to ensure the file is still visible
43
+ // whilst it is being uploaded.
44
+ .should('be.visible').should('have.attr', 'data-test-status', 'complete');
45
+ });
46
+ }
47
+ }, {
48
+ key: "findCardNth",
49
+ value: function findCardNth(nth) {
50
+ return this.cy.get('[data-test-media-name][data-test-status="complete"]').should('have.length.at.least', nth).should('be.visible').eq(nth - 1);
51
+ }
52
+ }, {
53
+ key: "findImage",
54
+ value: function findImage(nth) {
55
+ return this.cy.get(this.toTestId('media-image')).should('have.length.at.least', nth).should('be.visible').eq(nth - 1);
56
+ }
57
+ }, {
58
+ key: "assertAltText",
59
+ value: function assertAltText(altText) {
60
+ var nth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
61
+ return this.findImage(nth).should('have.attr', 'alt', altText);
62
+ }
63
+ }]);
64
+ return MediaCardPageObject;
65
+ }(_inProductTesting.InProductTestPageObject);
66
+
67
+ exports.MediaCardPageObject = MediaCardPageObject;
@@ -90,7 +90,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
90
90
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
91
91
 
92
92
  var packageName = "@atlaskit/media-card";
93
- var packageVersion = "74.1.2";
93
+ var packageVersion = "74.1.3";
94
94
 
95
95
  var CardBase = /*#__PURE__*/function (_Component) {
96
96
  (0, _inherits2.default)(CardBase, _Component);
@@ -22,7 +22,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
22
22
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
23
23
 
24
24
  var packageName = "@atlaskit/media-card";
25
- var packageVersion = "74.1.2";
25
+ var packageVersion = "74.1.3";
26
26
  var concurrentExperience;
27
27
 
28
28
  var getExperience = function getExperience(id) {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-card",
3
- "version": "74.1.2",
3
+ "version": "74.1.3",
4
4
  "sideEffects": false
5
5
  }
@@ -0,0 +1 @@
1
+ export { MediaCardPageObject } from './page-objects/MediaCard';
@@ -0,0 +1,23 @@
1
+ import { InProductTestPageObject } from '@atlaskit/in-product-testing';
2
+ export class MediaCardPageObject extends InProductTestPageObject {
3
+ expectCardReady(numOfCards) {
4
+ return this.cy.get('[data-test-media-name]').should('have.length', numOfCards).each(element => {
5
+ this.cy.wrap(element) // NOTE: `be.visible` is used to ensure the file is still visible
6
+ // whilst it is being uploaded.
7
+ .should('be.visible').should('have.attr', 'data-test-status', 'complete');
8
+ });
9
+ }
10
+
11
+ findCardNth(nth) {
12
+ return this.cy.get('[data-test-media-name][data-test-status="complete"]').should('have.length.at.least', nth).should('be.visible').eq(nth - 1);
13
+ }
14
+
15
+ findImage(nth) {
16
+ return this.cy.get(this.toTestId('media-image')).should('have.length.at.least', nth).should('be.visible').eq(nth - 1);
17
+ }
18
+
19
+ assertAltText(altText, nth = 1) {
20
+ return this.findImage(nth).should('have.attr', 'alt', altText);
21
+ }
22
+
23
+ }
@@ -25,7 +25,7 @@ import { getMediaCardCursor } from '../../utils/getMediaCardCursor';
25
25
  import { completeUfoExperience, startUfoExperience } from '../../utils/ufoExperiences';
26
26
  import { generateUniqueId } from '../../utils/generateUniqueId';
27
27
  const packageName = "@atlaskit/media-card";
28
- const packageVersion = "74.1.2";
28
+ const packageVersion = "74.1.3";
29
29
  export class CardBase extends Component {
30
30
  // An internalOccurrenceKey is a randomly generated value to differentiate various instances
31
31
  // of Cards regardless of whether it shares the same file (either internal or external)
@@ -3,7 +3,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata, LOGGED_FEATURE_FLAG_KE
3
3
  import { MediaCardError } from '../errors';
4
4
  import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
5
5
  const packageName = "@atlaskit/media-card";
6
- const packageVersion = "74.1.2";
6
+ const packageVersion = "74.1.3";
7
7
  let concurrentExperience;
8
8
 
9
9
  const getExperience = id => {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-card",
3
- "version": "74.1.2",
3
+ "version": "74.1.3",
4
4
  "sideEffects": false
5
5
  }
@@ -0,0 +1 @@
1
+ export { MediaCardPageObject } from './page-objects/MediaCard';
@@ -0,0 +1,53 @@
1
+ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
+ import _createClass from "@babel/runtime/helpers/createClass";
3
+ import _inherits from "@babel/runtime/helpers/inherits";
4
+ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
+ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
+
7
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
8
+
9
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10
+
11
+ import { InProductTestPageObject } from '@atlaskit/in-product-testing';
12
+ export var MediaCardPageObject = /*#__PURE__*/function (_InProductTestPageObj) {
13
+ _inherits(MediaCardPageObject, _InProductTestPageObj);
14
+
15
+ var _super = _createSuper(MediaCardPageObject);
16
+
17
+ function MediaCardPageObject() {
18
+ _classCallCheck(this, MediaCardPageObject);
19
+
20
+ return _super.apply(this, arguments);
21
+ }
22
+
23
+ _createClass(MediaCardPageObject, [{
24
+ key: "expectCardReady",
25
+ value: function expectCardReady(numOfCards) {
26
+ var _this = this;
27
+
28
+ return this.cy.get('[data-test-media-name]').should('have.length', numOfCards).each(function (element) {
29
+ _this.cy.wrap(element) // NOTE: `be.visible` is used to ensure the file is still visible
30
+ // whilst it is being uploaded.
31
+ .should('be.visible').should('have.attr', 'data-test-status', 'complete');
32
+ });
33
+ }
34
+ }, {
35
+ key: "findCardNth",
36
+ value: function findCardNth(nth) {
37
+ return this.cy.get('[data-test-media-name][data-test-status="complete"]').should('have.length.at.least', nth).should('be.visible').eq(nth - 1);
38
+ }
39
+ }, {
40
+ key: "findImage",
41
+ value: function findImage(nth) {
42
+ return this.cy.get(this.toTestId('media-image')).should('have.length.at.least', nth).should('be.visible').eq(nth - 1);
43
+ }
44
+ }, {
45
+ key: "assertAltText",
46
+ value: function assertAltText(altText) {
47
+ var nth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
48
+ return this.findImage(nth).should('have.attr', 'alt', altText);
49
+ }
50
+ }]);
51
+
52
+ return MediaCardPageObject;
53
+ }(InProductTestPageObject);
@@ -43,7 +43,7 @@ import { getMediaCardCursor } from '../../utils/getMediaCardCursor';
43
43
  import { completeUfoExperience, startUfoExperience } from '../../utils/ufoExperiences';
44
44
  import { generateUniqueId } from '../../utils/generateUniqueId';
45
45
  var packageName = "@atlaskit/media-card";
46
- var packageVersion = "74.1.2";
46
+ var packageVersion = "74.1.3";
47
47
  export var CardBase = /*#__PURE__*/function (_Component) {
48
48
  _inherits(CardBase, _Component);
49
49
 
@@ -9,7 +9,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata, LOGGED_FEATURE_FLAG_KE
9
9
  import { MediaCardError } from '../errors';
10
10
  import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
11
11
  var packageName = "@atlaskit/media-card";
12
- var packageVersion = "74.1.2";
12
+ var packageVersion = "74.1.3";
13
13
  var concurrentExperience;
14
14
 
15
15
  var getExperience = function getExperience(id) {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-card",
3
- "version": "74.1.2",
3
+ "version": "74.1.3",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-card",
3
- "version": "74.1.2",
3
+ "version": "74.1.3",
4
4
  "description": "Includes all media card related components, CardView, CardViewSmall, Card...",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@atlaskit/analytics-next": "^8.2.0",
33
- "@atlaskit/dropdown-menu": "^11.4.0",
33
+ "@atlaskit/dropdown-menu": "^11.5.0",
34
34
  "@atlaskit/editor-shared-styles": "^2.1.0",
35
35
  "@atlaskit/icon": "^21.10.0",
36
36
  "@atlaskit/in-product-testing": "^0.1.0",
@@ -74,13 +74,12 @@
74
74
  "@atlaskit/webdriver-runner": "*",
75
75
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
76
76
  "@atlassian/ufo": "^0.1.10",
77
- "@testing-library/react": "^8.0.1",
77
+ "@testing-library/react": "^12.1.5",
78
78
  "@types/classnames": "^2.2.6",
79
79
  "@types/react-loadable": "^5.4.1",
80
80
  "deepcopy": "0.6.3",
81
81
  "enzyme": "^3.10.0",
82
82
  "exenv": "^1.2.2",
83
- "local-cypress": "^1.2.1",
84
83
  "react": "^16.8.0",
85
84
  "react-dom": "^16.8.0",
86
85
  "react-intl-next": "npm:react-intl@^5.18.1",