itemengine-cypress-automation 1.0.404 → 1.0.405

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.
@@ -123,7 +123,7 @@ describe('Create item page - Text entry math: Scoring section', () => {
123
123
  equationEditorFlyout.steps.simulateKeyboardPress('1');
124
124
  equationEditorFlyout.steps.clickOnOkButton();
125
125
  });
126
-
126
+
127
127
  it('When user enters all the answers correctly then the answers should be validated and full score should be achieved', () => {
128
128
  textEntryMathPage.steps.verifyPreviewScore(5, 5)
129
129
  });
@@ -190,7 +190,12 @@ describe('Create item page - Text entry math: Scoring section', () => {
190
190
  });
191
191
 
192
192
  it('When user adds and alternate answer field in a response accordion, then the points per response accordion should not be updated', () => {
193
- textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
193
+ textEntryMathPage.steps.expandAndFocusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
194
+ equationEditorFlyout.steps.selectEquationEditorCategoryPreviewTab('Primary')
195
+ equationEditorFlyout.steps.selectCategoryCharacters(equationEditorCategoriesAndSymbols.primary.symbols.fraction.ariaLabel);
196
+ equationEditorFlyout.steps.enterTextAtInputFieldCursor('4{downarrow}');
197
+ equationEditorFlyout.steps.enterTextAtInputFieldCursor('8');
198
+ equationEditorFlyout.steps.clickOnOkButton();
194
199
  textEntryMathPage.steps.addAlternateAnswerInResponseAccordion(0);
195
200
  textEntryMathPage.steps.verifyPointsDisplayedOnResponseAccordion(0, 2);
196
201
  textEntryMathPage.steps.verifyPointsDisplayedOnResponseAccordion(1, 2);
@@ -1058,7 +1058,7 @@ describe('Create item page - Text entry math: Symbols are equivalent evaluation
1058
1058
 
1059
1059
  it('When the user enters a set of fractional and normal numbers separated by commas in \'Specify correct answer\' response field and then enters the same numbers in the same exact order then the answer should be treated as correct', () => {
1060
1060
  textEntryMathPage.steps.switchToEditTab();
1061
- textEntryMathPage.steps.focusInAndFocusOutOfResponseAnswerInputFieldSpecifyCorrectAnswer(0);
1061
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
1062
1062
  equationEditorFlyout.steps.enterEquation([{ categoryName: 'intermediate', symbolName: ['fraction'] }]);
1063
1063
  equationEditorFlyout.steps.enterTextInFirstEmptyBox(['1', '2']);
1064
1064
  equationEditorFlyout.steps.enterTextInPreviewInputField(',2,');
@@ -169,16 +169,14 @@ describe('Create Item page - Text entry math: Response evaluation methods and cu
169
169
  utilities.verifyInnerText(textEntryMathPage.responseAccordionAddAlternateButton(), 'Add alternate');
170
170
  });
171
171
 
172
- it('When single answer input field is present in blank state and user clicks on \'Add alternate\' button, then error message \'Error: Answer is required.\' should be displayed and new answer field should not be added', () => {
173
- textEntryMathPage.steps.addAlternateAnswerInResponseAccordion(0);
174
- utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Answer is required.');
175
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');
172
+ it('When single answer input field is present in blank state \'Add alternate\' button should be disabled', () => {
173
+ utilities.verifyElementDisabled(textEntryMathPage.responseAccordionAddAlternateButton());
176
174
  utilities.verifyElementCount(textEntryMathPage.responseAccordionAnswerInputField(), 1);
177
175
  });
178
176
 
179
- it('When user gives an input to \'Answer\' input field,then error message should disappear', () => {
177
+ it('When user gives an input to \'Answer\' input field,then add alternate button should not be disabled', () => {
180
178
  textEntryMathPage.steps.addInputToResponseAnswerInputFieldSpecifyCorrectAnswer(0, '(a+b)(a−b)');
181
- commonComponents.steps.verifyErrorMessageIsNotDisplayed();
179
+ utilities.verifyElementNotDisabled(textEntryMathPage.responseAccordionAddAlternateButton());
182
180
  });
183
181
 
184
182
  it('When user clicks on \'Add alternate\' button, then one more answer input field should be displayed', () => {
@@ -102,16 +102,14 @@ describe('Create question page - Audio player: Header section and saving resourc
102
102
  });
103
103
 
104
104
  describe('Validation error messages', () => {
105
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please upload a file']);
105
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please upload an audio file.']);
106
106
 
107
- it('Validation error message(s) should be displayed below required input field(s)', () => {
108
- utilities.verifyElementVisibilityState(audioPlayerPage.errorMessage(), 'visible');
109
- utilities.verifyInnerText(audioPlayerPage.errorMessage(), 'Error: The file type is not supported. Please upload a file with the following supported formats: MP3, WAV, AAC.');
107
+ it('Validation error message(s) should not be displayed', () => {
108
+ audioPlayerPage.steps.verifyErrorMessageIsNotDisplayed();
110
109
  });
111
110
 
112
- it('Validation error message(s) should disappear when required input field(s) are filled', () => {
111
+ it('User should be able to upload audio file', () => {
113
112
  audioPlayerPage.steps.uploadAudioFile('uploads/sample.mp3');
114
- audioPlayerPage.steps.verifyErrorMessageIsNotDisplayed();
115
113
  });
116
114
 
117
115
  audioPlayerPage.tests.verifyCreateItemWrapperContentsA11y();
@@ -153,9 +151,8 @@ describe('Create question page - Audio player: Header section and saving resourc
153
151
  ]);
154
152
  });
155
153
 
156
- it('When required input fields are filled then warning icons should disappear', () => {
154
+ it('User should be able to upload audio file', () => {
157
155
  audioPlayerPage.steps.uploadAudioFile('uploads/sample.mp3');
158
- audioPlayerPage.steps.verifyErrorMessageIsNotDisplayed();
159
156
  });
160
157
 
161
158
  it('Clicking on Save button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
@@ -16,7 +16,7 @@ const selectors = {
16
16
  uploadAudioFileNameLabel: () => cy.get('[class*="AudioPlayerstyles__AudioLabel"]').eq(1),
17
17
  deleteAudioFileButton: () => cy.get('[aria-label="Delete"]'),
18
18
  sourceUrlLabel: () => cy.get('[class*="AudioPlayerFormstyles__TextFieldLabel"]').eq(0),
19
- sourceUrlInputField: () => cy.get('[class*="AudioPlayerFormstyles__Text"] input[type="text"]'),
19
+ sourceUrlInputField: () => cy.get('.audio-player-resource input[type="text"]'),
20
20
  uploadAudioChooseFileButton: () => cy.get('.choose-file-upload-button'),
21
21
  uploadAudioNoFileChosenLabel: () => cy.get('[aria-label="No file chosen"]').eq(0),
22
22
  uploadedFileNameLabel: () => cy.get('[class*="AudioPlayerFormstyles__FileInputWrapper"] .selected-file-wrapper').eq(0),
@@ -46,11 +46,11 @@ const selectors = {
46
46
  customizePlayerLayoutProgressIndicatorButton: () => cy.get('[data-ngie-testid="progressbar-toggle-button"]'),
47
47
  customizePlayerLayoutToggleButtonLabel: () => cy.get('[class*="ToggleButtonMUI5style__ButtonLabelWrapper"]'),
48
48
  uncheckAllButton: () => cy.get('[class*="AudioPlayerstyles__UncheckButton"]'),
49
- uploadTranscriptFileLabel: () => cy.get('.upload-transcript-opt-label'),
50
- uploadTranscriptFileRadioButton: () => cy.get('.upload-transcript-opt-label input'),
51
- typeInTranscriptLabel: () => cy.get('.type-in-transcript-opt-label'),
49
+ uploadTranscriptFileLabel: () => cy.get('label[aria-label="Upload transcript file"]'),
50
+ uploadTranscriptFileRadioButton: () => cy.get('[type="radio"][aria-label="Upload transcript file"]'),
51
+ typeInTranscriptLabel: () => cy.get('label[aria-label="Type in transcript"]'),
52
52
  typeInTranscriptRadioButton: () => cy.get('[aria-label="Type in transcript"][type="radio"]'),
53
- transcriptInputField: () => cy.get('[title="Transcript"]'),
53
+ transcriptInputField: () => cy.get('[type="radio"][aria-label="Type in transcript"]'),
54
54
  cKEditorTranscriptInputField: () => cy.get('textarea[aria-label="Transcript"]'),
55
55
  ckEditorPlayAttemptsLimitInputField: () => cy.get('input[aria-label="Playback Limit"]'),
56
56
  allowStudentsToDownloadAudioLabel: () => cy.get('.allow-students-to-download-audio .MuiFormControlLabel-label').eq(0),
@@ -62,17 +62,16 @@ const selectors = {
62
62
  studentViewSettingsLabel: () => cy.get('[class*="AudioPlayerstyles__TranscriptLabelWrapper"]').eq(0),
63
63
  audioOverviewLabel: () => cy.get('.additional-settings-label'),
64
64
  audioOverviewInputField: () => cy.get('[title="Description"]'),
65
- transcriptLabel: () => cy.get('.freeResponseAudioFormTextInput .transcript-label'),
65
+ transcriptLabel: () => cy.get('[class*="TranscriptWrapper"] [class*="AudioPlayerstyles__TranscriptLabelWrapper"]'),
66
66
  uploadTranscriptUploadLabel: () => cy.get('[class*="AudioPlayerstyles__AudioLabel"]').eq(2),
67
67
  uploadTranscriptFileNameLabel: () => cy.get('[class*="AudioPlayerstyles__AudioLabel"]').eq(3),
68
68
  uploadTranscriptChooseFileButton: () => cy.get('.upload-audio-file-input-wrapper button').eq(1),
69
69
  uploadTranscriptNoFileChosenLabel: () => cy.get('[aria-label="No file chosen"]').eq(1),
70
- transcriptInputTypeFile: () => cy.get('.upload-transcript-file input[type="file"]'),
70
+ transcriptInputTypeFile: () => cy.get('.upload-audio-file-input[type=file]').eq(1),
71
71
  uploadedTranscriptFileNameLabel: () => cy.get('.upload-transcript-file .selected-file-wrapper'),
72
72
  transcriptFileUploadProgressBar: () => cy.get('.audio-player-form-progressbar'),
73
73
  transcriptInputFieldLabel: () => cy.get('.additional-settings-label').eq(1),
74
74
  deleteTranscriptButton: () => cy.get('[aria-label*="Delete"]'),
75
-
76
75
  //Preview tab
77
76
  volumeControlButton: () => cy.get('.audio-player-volume-wrapper .audio-player-icon'),
78
77
  playbackPlayButton: () => cy.get('.audio-resource-preview-wrapper-without-print button[aria-label="Play"]'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.404",
3
+ "version": "1.0.405",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {