itemengine-cypress-automation 1.0.280-applitools-0af112e.0 → 1.0.282-applitools-8c400f4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,6 +10,14 @@ describe('Preview of Audio response for compact audio recorder style', () => {
10
10
  cy.loginAs('admin');
11
11
  });
12
12
 
13
+ beforeEach(() => {
14
+ cy.startApplitools();
15
+ });
16
+
17
+ afterEach(() => {
18
+ cy.eyesClose();
19
+ });
20
+
13
21
  describe('Preview of Compact audio recorder style', { tags: 'smoke' }, () => {
14
22
  abortEarlySetup();
15
23
  before(() => {
@@ -71,7 +71,7 @@ describe('Create item page - audio response: Grading view, Correct answer view c
71
71
  });
72
72
 
73
73
  it('When the user seeks the progress bar slider while the audio is playing, then the audio should continue to play from the position where the slider is seeked', () => {
74
- audioResponsePage.steps.seekProgressBarSliderToCenter();3
74
+ audioResponsePage.steps.seekProgressBarSliderToCenter();
75
75
  audioResponsePage.steps.addWaitToPlayAudio(1000);
76
76
  audioResponsePage.steps.verifyProgressBarSliderPosition(actualAudioSeekedInPercent);
77
77
  });
@@ -11,6 +11,14 @@ describe('Create item page - Brainingcamp manipulative: Preview contents', () =>
11
11
  cy.loginAs('admin');
12
12
  });
13
13
 
14
+ beforeEach(() => {
15
+ cy.startApplitools();
16
+ });
17
+
18
+ afterEach(() => {
19
+ cy.eyesClose();
20
+ });
21
+
14
22
  views.forEach((view) => {
15
23
  describe(`Preview tab contents - ${view}`, { tags: 'smoke' }, () => {
16
24
  abortEarlySetup();
@@ -0,0 +1,14 @@
1
+ module.exports = {
2
+ apiKey: 'XkObRjxHCyNlYPTHm1VLxIKoCXxY1111nW2RQr5IaUHHk110',
3
+ serverUrl: 'https://eyes.applitools.com',
4
+ browser: [
5
+ { width: 1366, height: 609, name: 'chrome' },
6
+ { width: 1280, height: 832, name: 'edgechromium' },
7
+ { width: 1536, height: 960, name: 'safari' },
8
+ { width: 1024, height: 1366, name: 'safari' }
9
+ ],
10
+ //Configuration options: https://applitools.com/tutorials/sdks/cypress/configuration
11
+ ignoreDisplacements: true, // Set to false to detect mismatches in the displacements of the elements
12
+ failCypressOnDiff: false, // Set to true to fail the test when differences are detected
13
+ isDisabled: false // Set to true to disable Applitools
14
+ };
@@ -5,6 +5,7 @@ import 'cypress-file-upload';
5
5
  import { iePage } from './migrationHelpers/verifyIeQuestionData';
6
6
  import { lrnPage } from './migrationHelpers/extractLrnQuestionData';
7
7
  require('cy-verify-downloads').addCustomCommand();
8
+ import { apiKey, browser, serverUrl } from '../e2e/applitools.config';
8
9
  //import addContext from "mochawesome/addContext";
9
10
 
10
11
  const randomUser = (j, username, i) => ({
@@ -154,6 +155,16 @@ Cypress.Commands.add('learnosityLoaderWait', () => {
154
155
  .should('be.visible');
155
156
  });
156
157
 
158
+ Cypress.Commands.add('startApplitools', () => {
159
+ cy.eyesOpen({
160
+ apiKey,
161
+ serverUrl,
162
+ browser,
163
+ appName: 'Applitools Demo - ILC',
164
+ testName: Cypress.currentTest.title,
165
+ });
166
+ });
167
+
157
168
  Cypress.Commands.add('lazyLoadPreviewQuestions', (count, retries = 5) => {
158
169
  iePage.questionAndResourceWrapper()
159
170
  .then((elements) => {
@@ -4,6 +4,7 @@ import 'cypress-axe';
4
4
  import './helpers/cypressUtilities';
5
5
  import './helpers/accessibility';
6
6
  import './helpers/selectText';
7
+ import '@applitools/eyes-cypress/commands'
7
8
 
8
9
  let windowConsoleError;
9
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.280-applitools-0af112e.0",
3
+ "version": "1.0.282-applitools-8c400f4.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -35,5 +35,8 @@
35
35
  "node-fetch": "^3.3.2",
36
36
  "react-uuid": "^2.0.0",
37
37
  "typescript": "^5.6.3"
38
+ },
39
+ "devDependencies": {
40
+ "@applitools/eyes-cypress": "^3.47.0"
38
41
  }
39
42
  }