Skip to content
Snippets Groups Projects
Unverified Commit 4f37d560 authored by Kamil Mielnik's avatar Kamil Mielnik Committed by GitHub
Browse files

Enable running tagged tests defined in TS (#43172)

* Update & tag a test

* Run tests also on TS files

* Update mongo test
parent 80687b8a
No related branches found
No related tags found
No related merge requests found
...@@ -144,7 +144,7 @@ jobs: ...@@ -144,7 +144,7 @@ jobs:
run: | run: |
yarn run test-cypress-run \ yarn run test-cypress-run \
--env grepTags=@OSS,grepOmitFiltered=true \ --env grepTags=@OSS,grepOmitFiltered=true \
--spec './e2e/test/scenarios/**/*.cy.spec.js' \ --spec './e2e/test/scenarios/**/*.cy.spec.(js|ts)' \
--browser 'replay-chromium' --browser 'replay-chromium'
- name: Run slow and resource-intensive Cypress tests - name: Run slow and resource-intensive Cypress tests
...@@ -152,7 +152,7 @@ jobs: ...@@ -152,7 +152,7 @@ jobs:
run: | run: |
yarn run test-cypress-run \ yarn run test-cypress-run \
--env grepTags="@slow",grepOmitFiltered=true \ --env grepTags="@slow",grepOmitFiltered=true \
--spec './e2e/test/scenarios/**/*.cy.spec.js' \ --spec './e2e/test/scenarios/**/*.cy.spec.(js|ts)' \
--browser 'replay-chromium' --browser 'replay-chromium'
- name: Run Flaky Cypress tests - name: Run Flaky Cypress tests
...@@ -160,7 +160,7 @@ jobs: ...@@ -160,7 +160,7 @@ jobs:
run: | run: |
yarn run test-cypress-run \ yarn run test-cypress-run \
--env grepTags="@flaky --@quarantine",grepOmitFiltered=true \ --env grepTags="@flaky --@quarantine",grepOmitFiltered=true \
--spec './e2e/test/scenarios/**/*.cy.spec.js' \ --spec './e2e/test/scenarios/**/*.cy.spec.(js|ts)' \
--browser 'replay-chromium' --browser 'replay-chromium'
- name: Run EE Cypress tests on ${{ matrix.name }} - name: Run EE Cypress tests on ${{ matrix.name }}
...@@ -176,7 +176,7 @@ jobs: ...@@ -176,7 +176,7 @@ jobs:
run: | run: |
yarn run test-cypress-run \ yarn run test-cypress-run \
--env grepTags="@mongo --@quarantine",grepOmitFiltered=true \ --env grepTags="@mongo --@quarantine",grepOmitFiltered=true \
--spec './e2e/test/scenarios/**/*.cy.spec.js' \ --spec './e2e/test/scenarios/**/*.cy.spec.(js|ts)' \
--browser 'replay-chromium' --browser 'replay-chromium'
env: env:
CYPRESS_QA_DB_MONGO: true CYPRESS_QA_DB_MONGO: true
......
...@@ -418,7 +418,7 @@ describe("scenarios > notebook > data source", () => { ...@@ -418,7 +418,7 @@ describe("scenarios > notebook > data source", () => {
}); });
}); });
describeOSS("scenarios > notebook > data source", () => { describeOSS("scenarios > notebook > data source", { tags: "@OSS" }, () => {
beforeEach(() => { beforeEach(() => {
restore("setup"); restore("setup");
cy.signInAsAdmin(); cy.signInAsAdmin();
...@@ -433,19 +433,12 @@ describeOSS("scenarios > notebook > data source", () => { ...@@ -433,19 +433,12 @@ describeOSS("scenarios > notebook > data source", () => {
}); });
startNewQuestion(); startNewQuestion();
popover().within(() => { entityPickerModal().within(() => {
cy.findByPlaceholderText("Search for some data…"); cy.findAllByRole("tab").should("have.length", 2);
cy.findAllByTestId("data-bucket-list-item") entityPickerModalTab("Recents").should("not.exist");
.as("sources") entityPickerModalTab("Models").and("have.attr", "aria-selected", "true");
.should("have.length", 2); entityPickerModalTab("Tables").should("exist");
cy.get("@sources") entityPickerModalTab("Saved questions").should("not.exist");
.first()
.should("contain", "Models")
.and("have.attr", "aria-selected", "false");
cy.get("@sources")
.last()
.should("contain", "Raw Data")
.and("have.attr", "aria-selected", "false");
}); });
}); });
}); });
......
...@@ -26,6 +26,7 @@ import { ...@@ -26,6 +26,7 @@ import {
expectGoodSnowplowEvents, expectGoodSnowplowEvents,
expectNoBadSnowplowEvents, expectNoBadSnowplowEvents,
entityPickerModal, entityPickerModal,
entityPickerModalTab,
} from "e2e/support/helpers"; } from "e2e/support/helpers";
const { ORDERS, ORDERS_ID } = SAMPLE_DATABASE; const { ORDERS, ORDERS_ID } = SAMPLE_DATABASE;
...@@ -281,8 +282,8 @@ describe( ...@@ -281,8 +282,8 @@ describe(
it("should work for both simple and nested questions based on previously converted GUI query", () => { it("should work for both simple and nested questions based on previously converted GUI query", () => {
startNewQuestion(); startNewQuestion();
popover().within(() => { entityPickerModal().within(() => {
cy.findByText("Raw Data").click(); entityPickerModalTab("Tables").click();
cy.findByText(MONGO_DB_NAME).click(); cy.findByText(MONGO_DB_NAME).click();
cy.findByText("Products").click(); cy.findByText("Products").click();
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment