|
| 1 | + |
| 2 | + |
| 3 | +export class Steps { |
| 4 | + |
| 5 | + get disselectAllButtonSelector() { |
| 6 | + return `${this.tabPanelSelector} div:nth-child(2) div:nth-child(2)`; |
| 7 | + } |
| 8 | + |
| 9 | + get bookmarkModalSelector() { |
| 10 | + return 'fieldset.rcetic'; |
| 11 | + } |
| 12 | + |
| 13 | + get bookmarkSelectButtonSelector() { |
| 14 | + return `${this.bookmarkModalSelector} input`; |
| 15 | + } |
| 16 | + |
| 17 | + get bookmarkDisselectAllButtonSelector() { |
| 18 | + return `${this.bookmarkModalSelector} div:nth-child(2) button:nth-of-type(2)`; |
| 19 | + } |
| 20 | + |
| 21 | + get chromeInputCheckboxSelector() { |
| 22 | + return `${this.tabPanelSelector} div:nth-child(10) input[type="checkbox"]`; |
| 23 | + } |
| 24 | + |
| 25 | + get chromeSectionSelector() { |
| 26 | + return 'c-wiz [data-id="chrome"]'; |
| 27 | + } |
| 28 | + |
| 29 | + get chromeDataButtonSelector() { |
| 30 | + return `${this.tabPanelSelector} div:nth-child(10) > div:nth-child(2) > div:nth-child(2) button`; |
| 31 | + } |
| 32 | + |
| 33 | + get nextStepButtonSelector() { |
| 34 | + return `${this.tabPanelSelector} > div:nth-child(1) > div:nth-child(2) button`; |
| 35 | + } |
| 36 | + |
| 37 | + get createExportButtonSelector() { |
| 38 | + return 'div[data-configure-step="1"] button'; |
| 39 | + } |
| 40 | + |
| 41 | + get tabPanelSelector() { |
| 42 | + return 'div[role="tabpanel"]'; |
| 43 | + } |
| 44 | + |
| 45 | + get inputCheckboxSelector() { |
| 46 | + return `${this.tabPanelSelector} input[type="checkbox"]`; |
| 47 | + } |
| 48 | + |
| 49 | + get okButtonSelector() { |
| 50 | + return 'div[isfullscreen] div:nth-child(3) div:last-child'; |
| 51 | + } |
| 52 | + |
| 53 | + get bookmarkCheckboxSelector() { |
| 54 | + return `${this.bookmarkModalSelector} div:nth-child(3) > div:nth-of-type(2) input`; |
| 55 | + } |
| 56 | + |
| 57 | + /** |
| 58 | + * @returns {Array<Record<string, any>>} |
| 59 | + */ |
| 60 | + get actions() { |
| 61 | + return [ |
| 62 | + { |
| 63 | + id: 'disselect-all-button-click', |
| 64 | + actionType: 'click', |
| 65 | + elements: [{ |
| 66 | + type: 'element', |
| 67 | + selector: this.disselectAllButtonSelector |
| 68 | + }] |
| 69 | + }, |
| 70 | + { |
| 71 | + id: 'chrome-section-scroll', |
| 72 | + actionType: 'scroll', |
| 73 | + selector: this.chromeSectionSelector |
| 74 | + }, |
| 75 | + { |
| 76 | + id: 'chrome-section-select', |
| 77 | + actionType: 'click', |
| 78 | + elements: [{ |
| 79 | + type: 'element', |
| 80 | + selector: `${this.chromeSectionSelector} input` |
| 81 | + }] |
| 82 | + }, |
| 83 | + { |
| 84 | + id: 'chrome-data-button-click', |
| 85 | + actionType: 'click', |
| 86 | + elements: [{ |
| 87 | + type: 'element', |
| 88 | + selector: this.chromeDataButtonSelector |
| 89 | + }] |
| 90 | + }, |
| 91 | + { |
| 92 | + id: 'bookmark-modal-expectation', |
| 93 | + actionType: 'expectation', |
| 94 | + elements: [{ |
| 95 | + type: 'element', |
| 96 | + selector: this.bookmarkModalSelector |
| 97 | + }] |
| 98 | + }, |
| 99 | + { |
| 100 | + id: 'bookmark-disselect-all-button-click', |
| 101 | + actionType: 'click', |
| 102 | + elements: [{ |
| 103 | + type: 'element', |
| 104 | + selector: this.bookmarkDisselectAllButtonSelector |
| 105 | + }] |
| 106 | + }, |
| 107 | + { |
| 108 | + id: 'bookmark-checkbox-expectation', |
| 109 | + actionType: 'expectation', |
| 110 | + expectations: [{ |
| 111 | + type: 'element', |
| 112 | + selector: this.bookmarkCheckboxSelector |
| 113 | + }] |
| 114 | + }, |
| 115 | + { |
| 116 | + id: 'bookmark-checkbox-click', |
| 117 | + actionType: 'click', |
| 118 | + elements: [{ |
| 119 | + type: 'element', |
| 120 | + selector: this.bookmarkCheckboxSelector |
| 121 | + }] |
| 122 | + }, |
| 123 | + { |
| 124 | + id: 'ok-button-expectation', |
| 125 | + actionType: 'expectation', |
| 126 | + expectations: [{ |
| 127 | + type: 'element', |
| 128 | + selector: this.okButtonSelector |
| 129 | + }] |
| 130 | + }, |
| 131 | + { |
| 132 | + id: 'ok-button-click', |
| 133 | + actionType: 'click', |
| 134 | + elements: [{ |
| 135 | + type: 'element', |
| 136 | + selector: this.okButtonSelector |
| 137 | + }] |
| 138 | + }, |
| 139 | + { |
| 140 | + id: 'next-step-button-scroll', |
| 141 | + actionType: 'scroll', |
| 142 | + elements: [{ |
| 143 | + type: 'element', |
| 144 | + selector: this.nextStepButtonSelector |
| 145 | + }] |
| 146 | + }, |
| 147 | + { |
| 148 | + id: 'next-step-button-click', |
| 149 | + actionType: 'click', |
| 150 | + elements: [{ |
| 151 | + type: 'element', |
| 152 | + selector: this.nextStepButtonSelector |
| 153 | + }] |
| 154 | + }, |
| 155 | + { |
| 156 | + id: 'create-export-button-scroll', |
| 157 | + actionType: 'scroll', |
| 158 | + selector: this.createExportButtonSelector |
| 159 | + }, |
| 160 | + { |
| 161 | + id: 'create-export-button-click', |
| 162 | + actionType: 'click', |
| 163 | + elements: [{ |
| 164 | + type: 'element', |
| 165 | + selector: this.createExportButtonSelector |
| 166 | + }] |
| 167 | + } |
| 168 | + ]; |
| 169 | + } |
| 170 | +} |
| 171 | + |
| 172 | + |
0 commit comments