Skip to content

Commit 1bac241

Browse files
committed
Fix Search button not triggered #11
1 parent f84150b commit 1bac241

File tree

6 files changed

+23
-10
lines changed

6 files changed

+23
-10
lines changed

tests/RPM/utils/dataTypeFunctions.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ async function findDataType(page, dataType) {
107107
await page.locator('#dataTypes-search').fill(dataType);
108108

109109
// Click on the Search button
110-
await page.click('.table-container > div:nth-child(1) > button:nth-child(2)');
110+
await page.click('#dataTypes-searchSubmit');
111111

112112
// Get the row
113113
const row = page.locator('[id^=dataTypes-row-]');
@@ -183,6 +183,8 @@ async function findEditedDataType(page, dataType) {
183183

184184
// Search for the data type
185185
await page.locator('#dataTypes-search').fill(dataType);
186+
// Click on the Search button
187+
await page.click('#dataTypes-searchSubmit');
186188
// Get the row
187189
const row = page.locator('[id^=dataTypes-row-]');
188190
await expect(row).toHaveCount(1);

tests/RPM/utils/dimensionFunctions.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ async function findNewDimension(page, dimension) {
8989
// Wait for 1000 milliseconds
9090
await page.waitForTimeout(1000);
9191
// Click on the Search button
92-
await page.click('.table-container > div:nth-child(1) > button:nth-child(2)');
93-
92+
await page.click('#dimensions-searchSubmit');
9493
// Wait for 500 milliseconds
9594
await page.waitForTimeout(500);
9695
const row = page.locator('[id^=dimensions-row-]');
@@ -169,6 +168,8 @@ async function editDimensionDes(page, dimension) {
169168
async function findEditedDimension(page, dimension) {
170169
// Search for the dimension
171170
await page.locator('#dimensions-search').fill(dimension);
171+
// Click on the Search button
172+
await page.click('#dimensions-searchSubmit');
172173
// Get the row
173174
const row = page.locator('[id^=dimensions-row-]');
174175
await expect(row).toHaveCount(1);

tests/RPM/utils/domainFunctions.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ async function createDomainConstraint(page, constraint) {
157157
async function findDomainConstraint(page, constraint) {
158158
// Search for the constraint
159159
await page.locator('#constraints-search').fill(constraint);
160-
160+
// Click on the Search button
161+
await page.click('#constraints-searchSubmit');
161162
// Get the row
162163
const row = page.locator('[id^=constraints-row-]');
163164
await expect(row).toHaveCount(1);
@@ -210,7 +211,8 @@ async function findEditedDomainConstraint(page, constraint) {
210211

211212
// Search for the constraint
212213
await page.locator('#constraints-search').fill(constraint);
213-
214+
// Click on the Search button
215+
await page.click('#constraints-searchSubmit');
214216
// Get the row
215217
const row = page.locator('[id^=constraints-row-]');
216218
await expect(row).toHaveCount(1);

tests/RPM/utils/patternFunctions.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ async function createPatternConstraint(page, constraint) {
128128
await page.click('div.cm-activeLine.cm-line');
129129
// Type the text
130130
await page.keyboard.type('Hello Pattern');
131-
// Click on example and type test data
131+
// Click on example and type test data
132132
await page.click('#example');
133133
await page.type('#example', 'Hello, I am Tester');
134134
await page.waitForTimeout(500); // waits for 500 milliseconds
@@ -147,6 +147,8 @@ async function createPatternConstraint(page, constraint) {
147147
async function findPatternConstraint(page, constraint) {
148148
// Search for the constraint
149149
await page.locator('#constraints-search').fill(constraint);
150+
// Click on the Search button
151+
await page.click('#constraints-searchSubmit');
150152
// Get the row
151153
const row = page.locator('[id^=constraints-row-]');
152154
await expect(row).toHaveCount(1);
@@ -197,6 +199,8 @@ async function findEditedPatternConstraint(page, constraint) {
197199

198200
// Search for the constraint
199201
await page.locator('#constraints-search').fill(constraint);
202+
// Click on the Search button
203+
await page.click('#constraints-searchSubmit');
200204
// Get the row
201205
const row = page.locator('[id^=constraints-row-]');
202206
await expect(row).toHaveCount(1);
@@ -221,4 +225,3 @@ module.exports = {
221225
editPatternDescription,
222226
findEditedPatternConstraint
223227
};
224-

tests/RPM/utils/rangeFunctions.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ async function createRangeConstraint(page, constraint) {
146146
async function findRangeConstraint(page, constraint) {
147147
// Search for the constraint
148148
await page.locator('#constraints-search').fill(constraint);
149+
// Click on the Search button
150+
await page.click('#constraints-searchSubmit');
149151
// Get the row
150152
const row = page.locator('[id^=constraints-row-]');
151153
await expect(row).toHaveCount(1);
@@ -165,7 +167,7 @@ async function editRangeDescription(page, constraint) {
165167
await page.waitForLoadState('load');
166168
await page
167169
.locator('textarea[id=description]')
168-
.fill('Test constraint edited');
170+
.fill('Test constraint');
169171
// Wait for 500 milliseconds
170172
await page.waitForTimeout(500);
171173
await page.locator('input[id=name]').fill(constraint);
@@ -194,6 +196,8 @@ async function findEditedRangeConstraint(page, constraint) {
194196

195197
// Search for the constraint
196198
await page.locator('#constraints-search').fill(constraint);
199+
// Click on the Search button
200+
await page.click('#constraints-searchSubmit');
197201
// Get the row
198202
const row = page.locator('[id^=constraints-row-]');
199203
await expect(row).toHaveCount(1);
@@ -203,7 +207,7 @@ async function findEditedRangeConstraint(page, constraint) {
203207
// Check the values
204208
await expect(page.locator(`#constraints-name-${index}`)).toHaveText(constraint);
205209
await expect(page.locator(`#constraints-description-${index}`)).toHaveText(
206-
'Test constraint edited'
210+
'Test constraint'
207211
);
208212
await expect(page.locator(`#constraints-formalDescription-${index}`)).toHaveText(
209213
'The value must be between 5 (including) and 10 (including).');
@@ -218,4 +222,3 @@ module.exports = {
218222
editRangeDescription,
219223
findEditedRangeConstraint
220224
};
221-

tests/RPM/utils/uniqueFunction.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ async function deleteConstraint(page, constraint) {
4040
await page.waitForTimeout(500);
4141
// Search for the constraint
4242
await page.locator('#constraints-search').fill(constraint);
43+
// Click on the Search button
44+
await page.click('#constraints-searchSubmit');
4345
// Click on the delete button
4446
await page.locator('[id^=delete-]').click();
4547

0 commit comments

Comments
 (0)