Skip to content

Commit b4eb6ed

Browse files
authored
Merge branch 'main' into feat/workflow-executions-samples
2 parents 709e533 + 25027b8 commit b4eb6ed

19 files changed

Lines changed: 237 additions & 24 deletions

retail/interactive-tutorials/test/search-with-filtering.test.js

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -96,20 +96,14 @@ describe('Search with filtering', () => {
9696
const searchResult = response[IResponseParams.ISearchResult];
9797
if (searchResult.length) {
9898
searchResult.forEach(item => {
99-
expect(
100-
item.product,
101-
'Object has no "colorInfo" property'
102-
).to.have.property('colorInfo');
103-
expect(
104-
item.product.colorInfo,
105-
'Object has no "colorFamilies" array'
106-
).to.have.property('colorFamilies');
107-
expect(
108-
item.product.colorInfo.colorFamilies,
109-
'"colorFamilies" field does not containt filter condition value'
110-
)
111-
.to.be.an('array')
112-
.that.includes('Black');
99+
if (item.product?.colorInfo?.colorFamilies) {
100+
expect(
101+
item.product.colorInfo.colorFamilies,
102+
'"colorFamilies" field does not contain filter condition value'
103+
)
104+
.to.be.an('array')
105+
.that.includes('Black');
106+
}
113107
});
114108
} else {
115109
expect(searchResult).to.be.an('array').that.is.empty;

retail/interactive-tutorials/test/search-with-ordering.test.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,19 @@ describe('Search with ordering', () => {
9696
const searchResult = response[IResponseParams.ISearchResult];
9797
if (searchResult.length) {
9898
const prices = [];
99+
99100
searchResult.forEach(item => {
100-
prices.push(item.product.priceInfo.price);
101+
if (item.product?.priceInfo?.price !== undefined) {
102+
prices.push(item.product.priceInfo.price);
103+
}
101104
});
102-
const sortedArrayDesc = [...prices].sort((a, b) => b - a);
103-
expect(
104-
prices,
105-
'It should be an ordered array'
106-
).to.include.ordered.members(sortedArrayDesc);
105+
if (prices.length > 0) {
106+
const sortedArrayDesc = [...prices].sort((a, b) => b - a);
107+
expect(
108+
prices,
109+
'It should be an ordered array'
110+
).to.include.ordered.members(sortedArrayDesc);
111+
}
107112
} else {
108113
expect(searchResult, 'It should be an empty array').to.be.an('array')
109114
.that.is.empty;

retail/interactive-tutorials/test/search-with-pagination.test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ describe('Search with pagination', () => {
3838
assert.match(stdout, /Search start/);
3939
});
4040

41-
// TODO(#4136): Re-enable this test. See https://github.com/GoogleCloudPlatform/nodejs-docs-samples/issues/4136
42-
it.skip('should contain next page token', () => {
41+
it('should contain next page token', () => {
4342
assert.match(stdout, /Next page token/);
4443
});
4544

retail/interactive-tutorials/test/search-with-query-expansion-spec.test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ describe('Search with query expansion spec', () => {
9797
}
9898
});
9999

100-
// TODO(#4136): Re-enable this test. See https://github.com/GoogleCloudPlatform/nodejs-docs-samples/issues/4136
101-
it.skip('should contain expanded query', () => {
100+
it('should contain expanded query', () => {
102101
const searchResponse = response[IResponseParams.ISearchResponse];
103102
expect(
104103
searchResponse.queryExpansionInfo,

run/hello-broken/test/e2e_test_cleanup.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
steps:
216

317
- id: 'Delete image and service'

run/hello-broken/test/e2e_test_setup.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
steps:
216

317
- id: 'Build Container Image'

run/helloworld/test/e2e_test_cleanup.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
steps:
216

317
- id: 'Delete image and service'

run/helloworld/test/e2e_test_setup.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
steps:
216

317
- id: 'Build Container Image'

run/image-processing/test/app.test.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/**
2+
* Copyright 2026 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
const path = require('path');
218
const supertest = require('supertest');
319

run/image-processing/test/e2e_test_cleanup.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
steps:
216

317
- id: 'Delete image and service'

0 commit comments

Comments
 (0)