Skip to content

Commit 52bec69

Browse files
authored
Merge branch 'trunk' into use_rbs_trace
2 parents c492ae7 + 7a40d23 commit 52bec69

File tree

5 files changed

+125
-118
lines changed

5 files changed

+125
-118
lines changed

common/repositories.bzl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ js_library(
199199

200200
http_archive(
201201
name = "linux_chrome",
202-
url = "https://storage.googleapis.com/chrome-for-testing-public/136.0.7103.49/linux64/chrome-linux64.zip",
203-
sha256 = "cceec137ebf1d66cdee7966c05311cc7f200a0172d012925763c151bdca90edd",
202+
url = "https://storage.googleapis.com/chrome-for-testing-public/136.0.7103.92/linux64/chrome-linux64.zip",
203+
sha256 = "c98775f3f17ad7368e6c08b3254f8345a90179fb10321c980e8a6e7426b6761f",
204204
build_file_content = """
205205
load("@aspect_rules_js//js:defs.bzl", "js_library")
206206
package(default_visibility = ["//visibility:public"])
@@ -221,8 +221,8 @@ js_library(
221221

222222
http_archive(
223223
name = "mac_chrome",
224-
url = "https://storage.googleapis.com/chrome-for-testing-public/136.0.7103.49/mac-x64/chrome-mac-x64.zip",
225-
sha256 = "461b547a323784a1ac315fbf387dcbe777199d809c54ea8a0f635010538aaa76",
224+
url = "https://storage.googleapis.com/chrome-for-testing-public/136.0.7103.92/mac-x64/chrome-mac-x64.zip",
225+
sha256 = "eb2b36e4d07f7918766de16dca515b9dd122c74a27af91adf9443fdd20bf7c15",
226226
strip_prefix = "chrome-mac-x64",
227227
patch_cmds = [
228228
"mv 'Google Chrome for Testing.app' Chrome.app",
@@ -243,8 +243,8 @@ js_library(
243243

244244
http_archive(
245245
name = "linux_chromedriver",
246-
url = "https://storage.googleapis.com/chrome-for-testing-public/136.0.7103.49/linux64/chromedriver-linux64.zip",
247-
sha256 = "d9b388d8dc609f89332662a824899a0ed702a26c8dfd824e9a24a4e5fa44a197",
246+
url = "https://storage.googleapis.com/chrome-for-testing-public/136.0.7103.92/linux64/chromedriver-linux64.zip",
247+
sha256 = "69be66bd096f895227928e14b964dbbca57ca2eeed111ea8601e43b3ca31c382",
248248
strip_prefix = "chromedriver-linux64",
249249
build_file_content = """
250250
load("@aspect_rules_js//js:defs.bzl", "js_library")
@@ -261,8 +261,8 @@ js_library(
261261

262262
http_archive(
263263
name = "mac_chromedriver",
264-
url = "https://storage.googleapis.com/chrome-for-testing-public/136.0.7103.49/mac-x64/chromedriver-mac-x64.zip",
265-
sha256 = "ba9ce908dc76c0ae6a3ac9976a0f820247e48fca2b0c9a183dfed901ed16f157",
264+
url = "https://storage.googleapis.com/chrome-for-testing-public/136.0.7103.92/mac-x64/chromedriver-mac-x64.zip",
265+
sha256 = "3c8ef934f9a37f23081f24fc4354ea37ad08202cc3cca157380bf6524c5bc6ec",
266266
strip_prefix = "chromedriver-mac-x64",
267267
build_file_content = """
268268
load("@aspect_rules_js//js:defs.bzl", "js_library")

rb/spec/BUILD.bazel

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ rb_library(
2222
"//rb/spec/integration/selenium/webdriver:driver",
2323
"//rb/spec/integration/selenium/webdriver:element",
2424
"//rb/spec/integration/selenium/webdriver:error",
25-
"//rb/spec/integration/selenium/webdriver:guard",
2625
"//rb/spec/integration/selenium/webdriver:listener",
2726
"//rb/spec/integration/selenium/webdriver:manager",
2827
"//rb/spec/integration/selenium/webdriver:navigation",
@@ -34,7 +33,6 @@ rb_library(
3433
"//rb/spec/integration/selenium/webdriver:timeout",
3534
"//rb/spec/integration/selenium/webdriver:virtual_authenticator",
3635
"//rb/spec/integration/selenium/webdriver:window",
37-
"//rb/spec/integration/selenium/webdriver:zipper",
3836
"//rb/spec/integration/selenium/webdriver/bidi:browsing_context",
3937
"//rb/spec/integration/selenium/webdriver/bidi:log_inspector",
4038
"//rb/spec/integration/selenium/webdriver/bidi:network",

rb/spec/integration/selenium/webdriver/guard_spec.rb

Lines changed: 0 additions & 107 deletions
This file was deleted.
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# frozen_string_literal: true
2+
3+
# Licensed to the Software Freedom Conservancy (SFC) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The SFC licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
require_relative 'spec_helper'
21+
require 'selenium/webdriver/support/guards'
22+
23+
module Selenium
24+
module WebDriver
25+
module Support
26+
describe Guards do
27+
before do |example|
28+
guards = described_class.new(example, bug_tracker: 'https://github.com/SeleniumHQ/selenium/issues')
29+
guards.add_condition(:condition, :guarded)
30+
31+
results = guards.disposition
32+
send(*results) if results
33+
end
34+
35+
context 'with single guard' do
36+
describe '#exclude' do
37+
it 'ignores an unrecognized guard parameter', invalid: { condition: :guarded } do
38+
# pass
39+
end
40+
41+
it 'skips without running', exclude: { condition: :guarded } do
42+
raise 'This code will not get executed so it will not fail'
43+
end
44+
end
45+
46+
describe '#flaky' do
47+
it 'skips without running', flaky: { condition: :guarded } do
48+
raise 'This code will not get executed so it will not fail'
49+
end
50+
end
51+
52+
describe '#exclusive' do
53+
it 'skips without running if it does not match', exclusive: { condition: :not_guarded } do
54+
raise 'This code will not get executed so it will not fail'
55+
end
56+
57+
it 'does not guard if it does match', exclusive: { condition: :guarded } do
58+
# pass
59+
end
60+
end
61+
62+
describe '#only' do
63+
it 'guards when value does not match', only: { condition: :not_guarded } do
64+
raise 'This code is executed but expected to fail'
65+
end
66+
67+
it 'does not guard when value matches', only: { condition: :guarded } do
68+
# pass
69+
end
70+
end
71+
72+
describe '#except' do
73+
it 'guards when value matches and test fails', except: { condition: :guarded } do
74+
raise 'This code is executed but expected to fail'
75+
end
76+
77+
it 'does not guard when value does not match and test passes', except: { condition: :not_guarded } do
78+
# pass
79+
end
80+
end
81+
end
82+
83+
context 'when multiple guards' do
84+
it 'guards if neither only nor except match and test fails', except: { condition: :not_guarded },
85+
only: { condition: :not_guarded } do
86+
raise 'This code is executed but expected to fail'
87+
end
88+
89+
it 'guards if both only and except match', except: { condition: :guarded }, only: { condition: :guarded } do
90+
raise 'This code is executed but expected to fail'
91+
end
92+
93+
it 'guards if except matches and only does not', except: { condition: :guarded }, only: { condition: :not_guarded } do
94+
raise 'This code is executed but expected to fail'
95+
end
96+
97+
it 'does not guard if only matches and except does not', except: { condition: :not_guarded },
98+
only: { condition: :guarded } do
99+
# pass
100+
end
101+
102+
it 'gives correct reason', except: [{ condition: :guarded, reason: 'bug1' },
103+
{ condition: :not_guarded, reason: 'bug2' }] do
104+
raise 'This code is executed but expected to fail'
105+
end
106+
end
107+
108+
context 'when array of hashes' do
109+
it 'guards if any Hash value is satisfied', only: [{ condition: :guarded }, { condition: :not_guarded }] do
110+
raise 'This code is executed but expected to fail'
111+
end
112+
end
113+
end
114+
end # Support
115+
end # WebDriver
116+
end # Selenium

rb/spec/integration/selenium/webdriver/zipper_spec.rb renamed to rb/spec/unit/selenium/webdriver/zipper_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
module Selenium
2323
module WebDriver
24-
describe Zipper, exclusive: {bidi: false, reason: 'Not yet implemented with BiDi'} do
24+
describe Zipper do
2525
let(:base_file_name) { 'file.txt' }
2626
let(:file_content) { 'content' }
2727
let(:zip_file) { File.join(Dir.tmpdir, 'test.zip') }

0 commit comments

Comments
 (0)