itemengine-cypress-automation 1.0.302-RCA-5159-8641067.0 → 1.0.302

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.
@@ -0,0 +1,28 @@
1
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
2
+ import { multipleSelectionPage } from "../../../pages";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+
6
+ describe('Update Table: Edit tab', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe('Update table with missing tbody', () => {
12
+ abortEarlySetup();
13
+ before(() => {
14
+ multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
15
+ cy.barsPreLoaderWait();
16
+ multipleSelectionPage.steps.focusInQuestionInstructionsInputField();
17
+ multipleSelectionPage.steps.openSourceTab();
18
+ multipleSelectionPage.steps.addTableDataToSourceTextArea();
19
+ });
20
+
21
+ it('Open table properties for thabel without tbody, clear the header rows, and verify popup closes and alignment of cell preserved', () => {
22
+ multipleSelectionPage.steps.openTableProperties();
23
+ multipleSelectionPage.steps.clearRowHeaderAndSaveTableProperties();
24
+ utilities.verifyElementVisibilityState(multipleSelectionPage.ckEditorDialog(), 'notExist');
25
+ utilities.verifyElementVisibilityState(multipleSelectionPage.ckEditorTableCellWithCenterAlignStyle(), 'exist');
26
+ });
27
+ });
28
+ });
@@ -104,6 +104,11 @@ const selectors = {
104
104
  return cy.get('[class*="cke_dialog_ui_input_select"] option[value]').eq(3)
105
105
  }
106
106
  },
107
+ ckEditorDialog: () => cy.get('.cke_dialog_container'),
108
+ ckEditorDialogOkButton: () => cy.get('a[title="OK"]:visible'),
109
+ ckEditorTableCellWithCenterAlignStyle: () => cy.get('.custom_author_table td[style*="text-align: center"]').eq(0),
110
+ ckEditorTableCellWithCenterAlignClass: () => cy.get('.cke_editable table td[class*="text-center"]').eq(0),
111
+ tablePropertyButton: () => cy.get('iframe.cke_panel_frame').its('0.contentDocument.body').then(cy.wrap).find('a[title="Table Properties"]'),
107
112
  }
108
113
 
109
114
  const steps = {
@@ -733,9 +738,22 @@ const steps = {
733
738
  throw new Error(`Unknown Border Type: ${borderType}`);
734
739
  }
735
740
  },
741
+
742
+ openTableProperties: () => {
743
+ ckEditorInsertTableComponent.ckEditorTableCellWithCenterAlignClass().rightclick();
744
+ ckEditorInsertTableComponent.tablePropertyButton().click();
745
+ },
746
+
747
+ clearRowHeaderAndSaveTableProperties: () => {
748
+ ckEditorInsertTableComponent.rowHeaderInput()
749
+ .click()
750
+ .clear()
751
+ ckEditorInsertTableComponent.ckEditorDialogOkButton()
752
+ .click();
753
+ }
736
754
  }
737
755
 
738
756
  export const ckEditorInsertTableComponent = {
739
757
  ...selectors,
740
758
  steps
741
- }
759
+ }
@@ -13,6 +13,8 @@ const selectors = {
13
13
  //Link dialog box
14
14
  linkDialogboxDisplayTextInputField: () => cy.get('input[class*="cke_dialog_ui_input_text"]:visible').eq(0),
15
15
  linkDialogboxURLInputField: () => cy.get('input[class*="cke_dialog_ui_input_text"]:visible').eq(1),
16
+ sourceIcon: () => cy.get('a[title="Source"]:visible'),
17
+ sourceTextArea: () => cy.get('textarea.cke_source'),
16
18
  }
17
19
 
18
20
  const steps = {
@@ -58,8 +60,25 @@ const steps = {
58
60
  .click();
59
61
  });
60
62
  },
63
+
64
+ openSourceTab: () => {
65
+ ckEditorToolbar.sourceIcon()
66
+ .click();
67
+ },
68
+
69
+ addTableDataToSourceTextArea: () => {
70
+ const tableHTML = '<table border="1" class="custom_author_table ie-table ie-table-bordered" style="width: 100%;"><thead><tr><td>Header 1</td><td>Header 1</td></tr><tr><td class="text-center">A</td><td>B</td></tr><tr><td>C</td><td>D</td></tr></thead></table>';
71
+ ckEditorToolbar.sourceTextArea()
72
+ .type(tableHTML);
73
+ ckEditorToolbar.ckeOkButton().click();
74
+ },
75
+
76
+ saveTableProperties: () => {
77
+ ckEditorToolbar.ckeOkButton()
78
+ .click();
79
+ }
61
80
  }
62
81
  export const ckEditorToolbar = {
63
82
  ...selectors,
64
83
  steps
65
- }
84
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.302-RCA-5159-8641067.0",
3
+ "version": "1.0.302",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {