Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #3784 - Revert BQ and simple form changes #3786

Merged
merged 1 commit into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions config/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@
ES_URL = os.environ.get('ES_URL')
ES_API_KEY_ID = os.environ.get('ES_API_KEY_ID')
ES_API_KEY = os.environ.get('ES_API_KEY')
BQ_PROJECT = 'moz-fx-dev-dschubert-wckb'
BQ_TABLE = 'webcompat_user_reports.user_reports'

if STAGING:
GITHUB_CLIENT_ID = os.environ.get('STAGING_GITHUB_CLIENT_ID')
Expand All @@ -69,8 +67,7 @@
ES_URL = os.environ.get('ES_URL')
ES_API_KEY_ID = os.environ.get('ES_API_KEY_ID')
ES_API_KEY = os.environ.get('ES_API_KEY')
BQ_PROJECT = 'moz-fx-dev-dschubert-wckb'
BQ_TABLE = 'webcompat_user_reports.user_reports_staging'


if LOCALHOST:
# for now we are using .env only on localhost
Expand Down Expand Up @@ -98,8 +95,6 @@
ES_URL = os.environ.get('ES_URL')
ES_API_KEY_ID = os.environ.get('ES_API_KEY_ID')
ES_API_KEY = os.environ.get('ES_API_KEY')
BQ_PROJECT = 'moz-fx-dev-dschubert-wckb'
BQ_TABLE = 'webcompat_user_reports.user_reports_staging'

# BUG STATUS
# The id will be initialized when the app is started.
Expand Down
1 change: 0 additions & 1 deletion config/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Flask-Limiter==1.4
Flask-SQLAlchemy==2.4.4
Flask-WTF==0.15.1
GitHub-Flask==3.2.0
google-cloud-bigquery==3.11.1
Pillow==9.3.0
python-dotenv==0.15.0
requests==2.25.1
Expand Down
1 change: 0 additions & 1 deletion tests/functional/labels-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ registerSuite("Labels (auth)", {
.findByCssSelector(".js-label-search")
.pressKeys("\uE00C")
.end()
.sleep(500)
.findByCssSelector(".js-LabelEditorLauncher")
.click()
.getAttribute("class")
Expand Down
28 changes: 23 additions & 5 deletions tests/functional/reporting-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ registerSuite("Reporting (auth)", {
.findByCssSelector("#url")
.type("http://example.com")
.end()
.findById("steps_reproduce")
.type("This paragraph contains some description")
.end()
.sleep(500)
// Click on "Confirm"
.findByCssSelector(".next-url")
.click()
Expand Down Expand Up @@ -65,11 +61,33 @@ registerSuite("Reporting (auth)", {
document.querySelector("[for=tested_browsers-0]").click();
})
.end()
.sleep(1000)
.sleep(500)
// Click on "Confirm"
.findByCssSelector(".next-tested")
.click()
.end()
// Enter less than 30 characters in the description field
.findById("steps_reproduce")
.type("not enough characters")
.end()
.sleep(500)
.findDisplayedByCssSelector(".next-description")
.getAttribute("disabled")
.then(function (attribute) {
// Make sure "Continue" is disabled if there are not enough characters
assert.isNotNull(attribute);
})
.end()
.findById("steps_reproduce")
.clearValue()
// Enter more than 30 characters in the description field
.type("This paragraph contains more than 30 characters")
.end()
.sleep(500)
// Click on "Continue"
.findByCssSelector(".next-description")
.click()
.end()
.sleep(1000)
.findDisplayedByCssSelector(".next-screenshot")
// Click on "Continue without"
Expand Down
143 changes: 79 additions & 64 deletions tests/functional/reporting-issue-wizard-non-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,7 @@ registerSuite("Reporting with wizard", {
.findByCssSelector("#url")
.type("http://example.com")
.end()
.findDisplayedByCssSelector(".next-submit")
.getAttribute("disabled")
.then(function (attribute) {
// Make sure "Submit" is enabled
assert.isNull(attribute);
})
.end()
.findById("steps_reproduce")
.clearValue()
.type("This paragraph contains some description")
.end()
.sleep(500)
// Click on "Add more details"
// Click on "Confirm"
.findByCssSelector(".next-url")
.click()
.end()
Expand Down Expand Up @@ -187,6 +175,35 @@ registerSuite("Reporting with wizard", {
.end()
.findByCssSelector(".step.active .description")
.getVisibleText()
.then(function (text) {
// Make sure that progress label is "Description"
assert.include(text, "Description");
})
.end()
// Enter less than 30 characters in the description field
.findById("steps_reproduce")
.type("not enough characters")
.end()
.sleep(500)
.findDisplayedByCssSelector(".next-description")
.getAttribute("disabled")
.then(function (attribute) {
// Make sure "Continue" is disabled if there are not enough characters
assert.isNotNull(attribute);
})
.end()
.findById("steps_reproduce")
.clearValue()
// Enter more than 30 characters in the description field
.type("This paragraph contains more than 30 characters")
.end()
.sleep(500)
// Click on "Continue"
.findByCssSelector(".next-description")
.click()
.end()
.findByCssSelector(".step.active .description")
.getVisibleText()
.then(function (text) {
// Make sure that progress label is "Screenshot"
assert.include(text, "Screenshot");
Expand Down Expand Up @@ -232,20 +249,6 @@ registerSuite("Reporting with wizard", {
assert.include(text, "Web address");
})
.end()
.findDisplayedByCssSelector(".next-url")
.getAttribute("disabled")
.then(function (attribute) {
// Make sure "Add more details" is disabled if there is no url
assert.isNotNull(attribute);
})
.end()
.findDisplayedByCssSelector(".next-submit")
.getAttribute("disabled")
.then(function (attribute) {
// Make sure "Submit" is disabled if there is no url
assert.isNotNull(attribute);
})
.end()
// Manual url enter
.findByCssSelector("#url")
.type("http://example.com")
Expand All @@ -257,39 +260,10 @@ registerSuite("Reporting with wizard", {
.findByCssSelector(".step.active .description")
.getVisibleText()
.then(function (text) {
// Make sure that progress label is still "Web address"
assert.include(text, "Web address");
})
.end()
// Make sure that other problem field is focused
.getActiveElement()
.getProperty("id")
.then(function (elementId) {
assert.equal(
elementId,
"steps_reproduce",
"Focused element id is #steps_reproduce"
);
})
.end()
.findByCssSelector(".final-text")
.getVisibleText()
.then(function (text) {
assert.include(
text,
"Please describe what happened in order to proceed to the detailed reporter."
);
// Make sure that progress label is "Issue"
assert.include(text, "Issue");
})
.end()
.findById("steps_reproduce")
.clearValue()
.type("This paragraph contains some description")
.end()
.sleep(500)
// Click on "Confirm"
.findByCssSelector(".next-url")
.click()
.end()
.execute(function () {
// Click on "Design is broken"
document.querySelector("[for=problem_category-2]").click();
Expand Down Expand Up @@ -389,12 +363,28 @@ registerSuite("Reporting with wizard", {
.end()
.findByCssSelector(".step.active .description")
.getVisibleText()
.then(function (text) {
// Make sure that progress label is "Description"
assert.include(text, "Description");
})
.end()
// Enter more than 30 characters in the description field
.findById("steps_reproduce")
.type("This paragraph contains more than 30 characters")
.end()
.sleep(500)
// Click "Continue"
.findByCssSelector(".next-description")
.click()
.end()
.sleep(1000)
.findByCssSelector(".step.active .description")
.getVisibleText()
.then(function (text) {
// Make sure that progress label is "Screenshot"
assert.include(text, "Screenshot");
})
.end()
.sleep(500)
.findDisplayedByCssSelector(".next-screenshot")
.getVisibleText()
.then(function (text) {
Expand All @@ -408,7 +398,6 @@ registerSuite("Reporting with wizard", {
// Click on "Continue without"
.click()
.end()
.sleep(1000)
.findByCssSelector(".step.active .description")
.getVisibleText()
.then(function (text) {
Expand Down Expand Up @@ -450,10 +439,7 @@ registerSuite("Reporting with wizard", {
.end()
.end()
.sleep(500)
.findById("steps_reproduce")
.type("This paragraph contains some description")
.end()
.sleep(500)
// Click on "Confirm"
.findByCssSelector(".next-url")
.click()
.end()
Expand Down Expand Up @@ -535,6 +521,35 @@ registerSuite("Reporting with wizard", {
.end()
.findByCssSelector(".step.active .description")
.getVisibleText()
.then(function (text) {
// Make sure that progress label is "Description"
assert.include(text, "Description");
})
.end()
// Enter less than 30 characters
.findById("steps_reproduce")
.type("not enough characters")
.end()
.sleep(500)
.findDisplayedByCssSelector(".next-description")
.getAttribute("disabled")
.then(function (attribute) {
// Make sure "Continue" is disabled if there are not enough characters
assert.isNotNull(attribute);
})
.end()
// Enter more than 30 characters in the description field
.findById("steps_reproduce")
.clearValue()
.type("This paragraph contains more than 30 characters")
.end()
.sleep(500)
// Click "Continue"
.findByCssSelector(".next-description")
.click()
.end()
.findByCssSelector(".step.active .description")
.getVisibleText()
.then(function (text) {
// Make sure that progress label is "Screenshot"
assert.include(text, "Screenshot");
Expand Down
77 changes: 0 additions & 77 deletions tests/unit/test_bq.py

This file was deleted.

Loading