Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-zamora committed Jun 21, 2024
1 parent 8005691 commit 836cf51
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 20 deletions.
7 changes: 2 additions & 5 deletions cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,14 @@
// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)

// const { startDevServer } = require('@cypress/vite-dev-server')
// const viteConfig = require('../../vite.config.js')
const { startDevServer } = require('@cypress/vite-dev-server')

module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config

require('@cypress/code-coverage/task')(on, config)
// on('dev-server:start', (options) =>
// startDevServer({ options, viteConfig })
// );
on('dev-server:start', (options) => startDevServer({ options }))

return config
}
5 changes: 4 additions & 1 deletion playwright.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ module.exports = defineConfig({
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: [
['list'],
['html']
['html', {
outputFolder: 'playwright-report',
open: 'never'
}]
],
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
Expand Down
1 change: 1 addition & 0 deletions serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ provider:
endpointType: PRIVATE
memorySize: 128
environment:
NODE_ENV: development
# Variables for new Encrypted database
databaseEndpoint:
Fn::ImportValue: ${self:provider.stage}-EncryptedDatabaseEndpoint
Expand Down
2 changes: 2 additions & 0 deletions serverless/src/util/cmr/doSearchRequest.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ export const doSearchRequest = async ({

console.log(`Request ${requestId} completed external request in [reported: ${cmrTook} ms, observed: ${elapsedTime} ms]`)

console.log("🚀 ~ JSON.stringify(data:", JSON.stringify(data))

return {
statusCode: response.status,
headers: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ export const AuthCallbackContainer = ({

// Set the authToken cookie
set('authToken', jwt)
console.log("🚀 ~ useEffect ~ jwt:", jwt)

// Redirect the user to the correct location
window.location.replace(redirect)
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/authentication/authentication.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const expectedCollectionCount = 6
test.describe('Authentication', () => {
test.beforeEach(async ({ page }) => {
await page.route('**/*.{png,jpg,jpeg}', (route) => route.abort())
await page.route(/collections/, async (route) => {
await page.route(/collections$/, async (route) => {
await route.fulfill({
json: collectionFixture.body,
headers: collectionFixture.headers
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/collection_list/collection_list.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import singleCollection from './__mocks__/single_collection.json' with { type: '
test.describe('Collection List Behavior', () => {
test.beforeEach(async ({ page }) => {
await page.route('**/*.{png,jpg,jpeg}', (route) => route.abort())
await page.route(/collections/, async (route) => {
await page.route(/collections.json/, async (route) => {
await route.fulfill({
json: singleCollection.body,
headers: singleCollection.headers
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/history/history.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test.describe('History', () => {
test.beforeEach(async ({ page, context }) => {
const granuleHits = 1

await page.route(/collections/, async (route) => {
await page.route(/collections$/, async (route) => {
await route.fulfill({
json: collectionsSearchBody,
headers: {
Expand All @@ -40,7 +40,7 @@ test.describe('History', () => {
})
})

await page.route(/timeline/, async (route) => {
await page.route(/timeline$/, async (route) => {
await route.fulfill({
json: timeline.body
})
Expand Down
12 changes: 6 additions & 6 deletions tests/e2e/map/map.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -820,9 +820,9 @@ test.describe('Map interactions', () => {

// Point
const pointValues = {
chromium: 'margin-left: -12px; margin-top: -41px; width: 25px; height: 41px; transform: translate3d(427px, 182px, 0px); z-index: 182; outline: none;',
firefox: 'margin-left: -12px; margin-top: -41px; width: 25px; height: 41px; transform: translate3d(427px, 182px, 0px); z-index: 182; outline: none;',
webkit: 'margin-left: -12px; margin-top: -41px; width: 25px; height: 41px; transform: translate3d(427px, 182px, 0px); z-index: 182; outline: currentcolor;'
chromium: 'margin-left: -12px; margin-top: -41px; width: 25px; height: 41px; transform: translate3d(427px, 182px, 0px); z-index: 182; outline-style: none;',
firefox: 'margin-left: -12px; margin-top: -41px; width: 25px; height: 41px; transform: translate3d(427px, 182px, 0px); z-index: 182; outline-style: none;',
webkit: 'margin-left: -12px; margin-top: -41px; width: 25px; height: 41px; transform: translate3d(427px, 182px, 0px); z-index: 182; outline-style: none;'
}
await expect(page.locator('.leaflet-marker-icon.leaflet-interactive').nth(0)).toHaveAttribute('style', pointValues[browser])

Expand Down Expand Up @@ -1413,7 +1413,7 @@ test.describe('Map interactions', () => {
})
})

await page.route(/autocomplete/, async (route) => {
await page.route(/autocomplete$/, async (route) => {
await route.fulfill({
json: { feed: { entry: [] } }
})
Expand Down Expand Up @@ -1599,7 +1599,7 @@ test.describe('Map interactions', () => {
})
})

await page.route(/autocomplete/, async (route) => {
await page.route(/autocomplete$/, async (route) => {
await route.fulfill({
json: { feed: { entry: [] } }
})
Expand Down Expand Up @@ -1668,7 +1668,7 @@ test.describe('Map interactions', () => {
}
})

await page.route(/autocomplete/, async (route) => {
await page.route(/autocomplete$/, async (route) => {
await route.fulfill({
json: { feed: { entry: [] } }
})
Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/timeline/timeline.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test.describe('Timeline spec', () => {

const authHeaders = getAuthHeaders()

await page.route(/collections/, async (route) => {
await page.route(/collections$/, async (route) => {
await route.fulfill({
json: collectionFixture.body,
headers: collectionFixture.headers
Expand All @@ -37,7 +37,7 @@ test.describe('Timeline spec', () => {
})
})

await page.route(/timeline/, async (route) => {
await page.route(/timeline$/, async (route) => {
await route.fulfill({
json: timeline.body,
headers: authHeaders
Expand Down Expand Up @@ -72,7 +72,7 @@ test.describe('Timeline spec', () => {
})
})

await page.goto('/projects?p=!C1443528505-LAADS&sb=-77.15071678161621%2C38.78817179999825%2C-76.89801406860352%2C38.99784152603538&lat=37.64643450971326&long=-77.407470703125&zoom=7qt=2020-01-06T04%3A15%3A27.310Z%2C2020-01-13T07%3A32%3A50.962Z&ff=Map%20Imagery&tl=1563377338!4!!')
await page.goto('/projects?p=!C1443528505-LAADS&sb=-77.15071%2C38.78817%2C-76.89801%2C38.99784&lat=37.64643&long=-77.40747&zoom=7qt=2020-01-06T04%3A15%3A27.310Z%2C2020-01-13T07%3A32%3A50.962Z&ff=Map%20Imagery&tl=1563377338!4!!')

// Click the back to search button
await page.getByTestId('back-to-search-button').click()
Expand Down

0 comments on commit 836cf51

Please sign in to comment.