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

chore: minor style updates & fix a windows test #24558

Merged
merged 25 commits into from Nov 8, 2022
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
cb86749
wait for config initialization to be complete
marktnoonan Nov 6, 2022
a2ac561
increase timeout for cy-in-cy on windows
marktnoonan Nov 6, 2022
2060532
run more CI steps on this branch
marktnoonan Nov 6, 2022
57fdfc3
tweak border, fix double scrollbar
marktnoonan Nov 6, 2022
430d356
reach choose a browser page before login in launchpad test
marktnoonan Nov 7, 2022
ed3c0ff
revert timeout change
marktnoonan Nov 7, 2022
69559fb
chore: update vite in system test
lmiller1990 Nov 7, 2022
af43f3f
Merge branch 'develop' into marktnoonan/windows-test-updates
lmiller1990 Nov 7, 2022
2bf78a6
Fixing value for monthIndex to Date.UTC
warrensplayer Nov 7, 2022
7ef06fa
chore: fix test date
astone123 Nov 7, 2022
71a9418
Merge branch 'develop' into marktnoonan/windows-test-updates
astone123 Nov 7, 2022
75d25ca
chore: fix tests in reporter-ct-mount-hover.cy.ts
astone123 Nov 7, 2022
5cca59a
try fixing some flake
lmiller1990 Nov 8, 2022
12174a4
fix yarn lock
lmiller1990 Nov 8, 2022
aeaae33
conditionally skip flaky test on windows
lmiller1990 Nov 8, 2022
1924e6a
note on skipped test
lmiller1990 Nov 8, 2022
79ccaae
chore: skip flaky tests on windows only [skip ci]
lmiller1990 Nov 8, 2022
4cb9aef
Merge remote-tracking branch 'origin/develop' into marktnoonan/window…
lmiller1990 Nov 8, 2022
46a480f
Merge branch 'develop' into marktnoonan/windows-test-updates
lmiller1990 Nov 8, 2022
995dc7e
Merge branch 'marktnoonan/windows-test-updates' of https://github.com…
lmiller1990 Nov 8, 2022
4d4bb26
update exports and snaps
lmiller1990 Nov 8, 2022
223b35b
correctly use describe instead of it
lmiller1990 Nov 8, 2022
3fff7d1
fix types
lmiller1990 Nov 8, 2022
aa5c5fa
do not run windows anymore
lmiller1990 Nov 8, 2022
6b61388
add comment [skip ci]
lmiller1990 Nov 8, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 1 addition & 5 deletions .circleci/config.yml
Expand Up @@ -27,7 +27,6 @@ mainBuildFilters: &mainBuildFilters
branches:
only:
- develop
- 'release/11.0.0'

# usually we don't build Mac app - it takes a long time
# but sometimes we want to really confirm we are doing the right thing
Expand All @@ -36,7 +35,6 @@ macWorkflowFilters: &darwin-workflow-filters
when:
or:
- equal: [ develop, << pipeline.git.branch >> ]
- equal: [ 'release/11.0.0', << pipeline.git.branch >> ]
- matches:
pattern: "-release$"
value: << pipeline.git.branch >>
Expand All @@ -45,7 +43,6 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
when:
or:
- equal: [ develop, << pipeline.git.branch >> ]
- equal: [ 'release/11.0.0', << pipeline.git.branch >> ]
- matches:
pattern: "-release$"
value: << pipeline.git.branch >>
Expand All @@ -63,7 +60,6 @@ windowsWorkflowFilters: &windows-workflow-filters
when:
or:
- equal: [ develop, << pipeline.git.branch >> ]
- equal: [ 'release/11.0.0', << pipeline.git.branch >> ]
- matches:
pattern: "-release$"
value: << pipeline.git.branch >>
Expand Down Expand Up @@ -130,7 +126,7 @@ commands:
- run:
name: Check current branch to persist artifacts
command: |
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/11.0.0" ]]; then
if [[ "$CIRCLE_BRANCH" != "develop" ]]; then
echo "Not uploading artifacts or posting install comment for this branch."
circleci-agent step halt
fi
Expand Down
9 changes: 6 additions & 3 deletions packages/app/cypress/e2e/runner/reporter-ct-mount-hover.cy.ts
Expand Up @@ -12,9 +12,12 @@ const PROJECTS: {projectName: ProjectDirs[number], test: string}[] = [
{ projectName: 'nuxtjs-vue2-configured', test: 'Tutorial.cy' },
]

// These are especially flaky on windows, skipping them there.
const describeSkipIfWindows = Cypress.platform === 'win32' ? describe.skip : describe

// TODO: Add these tests to another cy-in-cy framework test to reduce CI cost as these scaffolding is expensive
for (const { projectName, test } of PROJECTS) {
describe(`CT Mount ${projectName}`, { viewportWidth: 1500, defaultCommandTimeout: 30000 }, () => {
describeSkipIfWindows(`CT Mount ${projectName}`, { viewportWidth: 1500, defaultCommandTimeout: 30000 }, () => {
beforeEach(() => {
cy.scaffoldProject(projectName)
cy.findBrowsers()
Expand All @@ -25,7 +28,7 @@ for (const { projectName, test } of PROJECTS) {
cy.startAppServer('component')
cy.visitApp()
cy.contains(`${test}`).click()
cy.waitForSpecToFinish()
cy.waitForSpecToFinish(undefined)
cy.get('.collapsible-header-inner:first').click().get('.command.command-name-mount > .command-wrapper').click().then(() => {
cy.get('iframe.aut-iframe').its('0.contentDocument.body').then(cy.wrap).within(() => {
cy.get('[data-cy-root]').children().should('have.length.at.least', 1)
Expand All @@ -36,7 +39,7 @@ for (const { projectName, test } of PROJECTS) {
cy.startAppServer('component')
cy.visitApp()
cy.contains(`${test}`).click()
cy.waitForSpecToFinish()
cy.waitForSpecToFinish(undefined)
cy.get('.command.command-name-mount > .command-wrapper').click().then(() => {
if (`${projectName}` === 'angular-14') {
cy.get('iframe.aut-iframe').its('0.contentDocument.body').children().should('have.length.at.least', 2)
Expand Down
12 changes: 8 additions & 4 deletions packages/app/cypress/e2e/runs.cy.ts
Expand Up @@ -848,9 +848,10 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
})
})

const RUNNING_COUNT = 3

describe('refetching', () => {
let obj: {toCall?: Function} = {}
const RUNNING_COUNT = 3

beforeEach(() => {
cy.scaffoldProject('component-tests')
Expand All @@ -874,7 +875,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
const setTimeout = win.setTimeout

// @ts-expect-error
win.setTimeout = function (fn, time) {
win.setTimeout = function (fn: () => void, time: number) {
if (fn.name === 'fetchNewerRuns') {
obj.toCall = fn
} else {
Expand All @@ -885,7 +886,10 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
})
})

it('should re-query for executing runs', () => {
// https://github.com/cypress-io/cypress/issues/24575
const itSkipIfWindows = Cypress.platform === 'win32' ? it.skip : it

itSkipIfWindows('should re-query for executing runs', () => {
cy.get('[data-cy="run-card-icon-RUNNING"]').should('have.length', RUNNING_COUNT).should('be.visible')

cy.remoteGraphQLIntercept(async (obj) => {
Expand Down Expand Up @@ -918,7 +922,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
completeNext(1)
})

it('should fetch newer runs and maintain them when navigating', () => {
itSkipIfWindows('should fetch newer runs and maintain them when navigating', () => {
cy.get('[data-cy="run-card-icon-RUNNING"]').should('have.length', RUNNING_COUNT).should('be.visible')

cy.remoteGraphQLIntercept(async (obj) => {
Expand Down
10 changes: 3 additions & 7 deletions packages/app/cypress/e2e/support/execute-spec.ts
@@ -1,7 +1,6 @@
import { shouldHaveTestResults } from '../runner/support/spec-loader'

export interface ExpectedResults
{
export interface ExpectedResults {
passCount?: number
failCount?: number
pendingCount?: number
Expand All @@ -23,13 +22,10 @@ declare global {
}
}

// Here we export the function with no intention to import it
// This only tells the typescript type checker that this definitely is a module
// This way, we are allowed to use the global namespace declaration
export const waitForSpecToFinish = (expectedResults, timeout?: number) => {
// First ensure the test is loaded
cy.get('.passed > .num').should('contain', '--')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Race condition - sometimes the rest actually executes fast enough, and it's not --, but the number of passes. So, better just verify the elements exist.

cy.get('.failed > .num').should('contain', '--')
cy.get('.passed > .num').should('exist')
cy.get('.failed > .num').should('exist')

// Then ensure the tests are running
cy.contains('Your tests are loading...', { timeout: timeout || 20000 }).should('not.exist')
Expand Down
5 changes: 3 additions & 2 deletions packages/launchpad/cypress/e2e/top-nav-launchpad.cy.ts
Expand Up @@ -472,7 +472,7 @@ describe('Launchpad Top Nav Workflows', () => {
cy.findByTestId(headerBarId).findByTestId('user-avatar-title').should('be.visible')
})

it('if the project has no runs, shows "record your first run" prompt after clicking', () => {
it('if the project has no runs, shows "record your first run" prompt after choosing testing type', () => {
cy.remoteGraphQLIntercept((obj) => {
if (obj.result?.data?.cloudProjectBySlug?.runs?.nodes?.length) {
obj.result.data.cloudProjectBySlug.runs.nodes = []
Expand All @@ -483,10 +483,11 @@ describe('Launchpad Top Nav Workflows', () => {

cy.contains('Component Testing').click()

cy.contains(defaultMessages.setupWizard.chooseBrowser.title).should('be.visible')

mockLogInActionsForUser(mockUserNoName)

logIn({ expectedNextStepText: 'Continue', displayName: mockUserNoName.email })

cy.contains('[data-cy=standard-modal] h2', defaultMessages.specPage.banners.record.title).should('be.visible')
cy.contains('[data-cy=standard-modal]', defaultMessages.specPage.banners.record.content).should('be.visible')
cy.contains('button', 'Copy').should('be.visible')
Expand Down
Expand Up @@ -21,7 +21,7 @@ describe('<MajorVersionWelcome />', { viewportWidth: 1280, viewportHeight: 1400
})

it('renders correct time for releases and overflows correctly', () => {
cy.clock(Date.UTC(2022, 11, 8))
cy.clock(Date.UTC(2022, 10, 8))
cy.mount(<MajorVersionWelcome />)
cy.contains('11.0.0 Released just now')
cy.contains('10.0.0 Released 5 months ago')
Expand Down
8 changes: 4 additions & 4 deletions packages/launchpad/src/migration/MajorVersionWelcome.vue
Expand Up @@ -2,13 +2,13 @@
<div class="bg-no-repeat bg-cover h-screen min-h-700px lp-wrapper">
<div
ref="wrapper"
class="border-transparent rounded mx-auto bg-gray-50/50 border-4px max-w-80vw top-7vh w-716px relative overflow-hidden"
class="rounded mx-auto bg-gray-50/50 border-color-[rgba(0,0,0,0.05)] border-4px max-w-80vw top-7vh w-716px relative overflow-hidden"
>
<div
ref="scroller"
class="bg-white rounded-b max-h-72vh pb-90px overflow-scroll"
>
<div class="h-full overflow-scroll">
<div class="h-full">
<div class="p-16px">
<h1 class="font-medium mt-4px text-center mb-32px tracking-tighter text-22px text-gray-1000">
{{ t('majorVersionWelcome.title') }}
Expand Down Expand Up @@ -136,8 +136,8 @@ const handleClick = () => {

const versionReleaseDates = computed(() => {
return {
'10': useTimeAgo(Date.UTC(2022, 6, 1)).value,
'11': useTimeAgo(Date.UTC(2022, 11, 8)).value,
'10': useTimeAgo(Date.UTC(2022, 5, 1)).value,
'11': useTimeAgo(Date.UTC(2022, 10, 8)).value,
}
})

Expand Down
2 changes: 1 addition & 1 deletion system-tests/projects/react17/package.json
Expand Up @@ -7,7 +7,7 @@
"@vitejs/plugin-react": "^1.3.2",
"css-loader": "^4.3.0",
"style-loader": "^2.0.0",
"vite": "2.9.14",
"vite": "3.2.2",
ZachJW34 marked this conversation as resolved.
Show resolved Hide resolved
"webpack": "^4"
},
"sideEffects": false,
Expand Down